From 82511b27a0f5736a045d46835696bca92ecaa72f Mon Sep 17 00:00:00 2001 From: Hicham Boushaba Date: Wed, 18 Sep 2024 12:51:20 +0100 Subject: [PATCH] Pass the new password when updating the product --- .../fluxc/network/rest/wpcom/wc/product/ProductRestClient.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/product/ProductRestClient.kt b/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/product/ProductRestClient.kt index de133f1b4e..81dda78e73 100644 --- a/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/product/ProductRestClient.kt +++ b/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/product/ProductRestClient.kt @@ -1999,6 +1999,9 @@ class ProductRestClient @Inject constructor( } } } + if (storedWCProductModel.password != updatedProductModel.password) { + body["post_password"] = updatedProductModel.password.orEmpty() + } return body }