diff --git a/example/src/test/java/org/wordpress/android/fluxc/wc/order/WCOrderStoreTest.kt b/example/src/test/java/org/wordpress/android/fluxc/wc/order/WCOrderStoreTest.kt index f380ee9d58..20e70a02be 100644 --- a/example/src/test/java/org/wordpress/android/fluxc/wc/order/WCOrderStoreTest.kt +++ b/example/src/test/java/org/wordpress/android/fluxc/wc/order/WCOrderStoreTest.kt @@ -641,7 +641,11 @@ class WCOrderStoreTest { .thenReturn(BulkUpdateOrderStatusResponsePayload(successResponses)) // When - val result = orderStore.batchUpdateOrdersStatus(site, orderIds, newStatus) + val result = orderStore.batchUpdateOrdersStatus( + site, + orderIds, + WCOrderStatusModel(COMPLETED.value) + ) // Then assertThat(result.isError).isFalse() @@ -687,7 +691,11 @@ class WCOrderStoreTest { .thenReturn(BulkUpdateOrderStatusResponsePayload(mixedResponses)) // When - val result = orderStore.batchUpdateOrdersStatus(site, orderIds, newStatus) + val result = orderStore.batchUpdateOrdersStatus( + site, + orderIds, + WCOrderStatusModel(COMPLETED.value) + ) // Then assertThat(result.isError).isFalse() diff --git a/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/store/WCOrderStore.kt b/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/store/WCOrderStore.kt index 7d501976c9..b79d42680a 100644 --- a/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/store/WCOrderStore.kt +++ b/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/store/WCOrderStore.kt @@ -1174,9 +1174,9 @@ class WCOrderStore @Inject constructor( suspend fun batchUpdateOrdersStatus( site: SiteModel, orderIds: List, - newStatus: String + newStatus: WCOrderStatusModel ): WooResult { - val result = wcOrderRestClient.batchUpdateOrdersStatus(site, orderIds, newStatus) + val result = wcOrderRestClient.batchUpdateOrdersStatus(site, orderIds, newStatus.statusKey) return if (!result.isError) { val orders = result.response