You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 4, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/product/ProductRestClient.kt
+2-9Lines changed: 2 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -866,13 +866,6 @@ class ProductRestClient @Inject constructor(
866
866
*
867
867
* @param [productId] Unique server id of the product
868
868
*
869
-
* Variations by default are sorted by `menu_order` with sorting order = desc.
870
-
* i.e. `orderby` = `menu_order` and `order` = `desc`
871
-
*
872
-
* We do not pass `orderby` field in the request here because the API does not support `orderby`
873
-
* with `menu_order` as value. But we still need to pass `order` field to the API request in order to
874
-
* preserve the sorting order when fetching multiple pages of variations.
875
-
*
876
869
*/
877
870
suspendfunfetchProductVariations(
878
871
site:SiteModel,
@@ -885,7 +878,7 @@ class ProductRestClient @Inject constructor(
885
878
"per_page" to pageSize.toString(),
886
879
"offset" to offset.toString(),
887
880
"order" to "asc",
888
-
"orderby" to "date"
881
+
"orderby" to "menu_order"
889
882
)
890
883
891
884
val response = wooNetwork.executeGetGsonRequest(
@@ -944,7 +937,7 @@ class ProductRestClient @Inject constructor(
0 commit comments