Skip to content

Commit fae9beb

Browse files
committed
Skip updating password for users authenticated without wpcom
1 parent f499102 commit fae9beb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

WooCommerce/Classes/ViewRelated/Products/Edit Product/ProductFormRemoteActionUseCase.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,9 @@ private extension ProductFormRemoteActionUseCase {
240240
func updatePasswordRemotely(product: EditableProductModel,
241241
password: String?,
242242
onCompletion: @escaping (Result<String?, Error>) -> Void) {
243-
// Only update product password if available.
244-
guard let updatedPassword = password else {
243+
// Only update product password if available and user is authenticated with WPCom.
244+
guard let updatedPassword = password,
245+
stores.isAuthenticatedWithoutWPCom == false else {
245246
onCompletion(.success(password))
246247
return
247248
}

0 commit comments

Comments
 (0)