Skip to content

Commit

Permalink
Merge pull request #3081 from wordpress-mobile/fix/add-stock-status-f…
Browse files Browse the repository at this point in the history
…ilterable-values

Add stock status filterable values
  • Loading branch information
atorresveiga committed Aug 16, 2024
2 parents 863f213 + 1e86968 commit 67b7168
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ enum class CoreProductStockStatus(val value: String) {
ON_BACK_ORDER("onbackorder");

companion object {
private val valueMap = values().associateBy(CoreProductStockStatus::value)
private val valueMap = entries.associateBy(CoreProductStockStatus::value)
val ALL_VALUES = valueMap.keys

val FILTERABLE_VALUES = setOf(IN_STOCK, OUT_OF_STOCK, ON_BACK_ORDER)
/**
* Convert the base value into the associated CoreProductStockStatus object
*/
Expand Down

0 comments on commit 67b7168

Please sign in to comment.