Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit 67b7168

Browse files
authored
Merge pull request #3081 from wordpress-mobile/fix/add-stock-status-filterable-values
Add stock status filterable values
2 parents 863f213 + 1e86968 commit 67b7168

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/product/CoreProductStockStatus.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ enum class CoreProductStockStatus(val value: String) {
1010
ON_BACK_ORDER("onbackorder");
1111

1212
companion object {
13-
private val valueMap = values().associateBy(CoreProductStockStatus::value)
13+
private val valueMap = entries.associateBy(CoreProductStockStatus::value)
1414
val ALL_VALUES = valueMap.keys
1515

16+
val FILTERABLE_VALUES = setOf(IN_STOCK, OUT_OF_STOCK, ON_BACK_ORDER)
1617
/**
1718
* Convert the base value into the associated CoreProductStockStatus object
1819
*/

0 commit comments

Comments
 (0)