Skip to content

Commit ae29827

Browse files
committed
If the password was not fetched, the visibility cell is not selectable
1 parent a5ffc3d commit ae29827

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

WooCommerce/Classes/ViewRelated/Products/Edit Product/Product Settings/ProductSettingsRows.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ enum ProductSettingsRows {
5757
func handleTap(sourceViewController: UIViewController, onCompletion: @escaping (ProductSettings) -> Void) {
5858

5959
/// If the status is private, the cell doesn't trigger any action
60-
guard isStatusPrivate() else {
60+
guard !isStatusPrivate() else {
6161
return
6262
}
6363

@@ -101,6 +101,11 @@ enum ProductSettingsRows {
101101
}
102102

103103
func handleTap(sourceViewController: UIViewController, onCompletion: @escaping (ProductSettings) -> Void) {
104+
// If the password was not fetched, the cell is not selectable
105+
guard settings.password != nil else {
106+
return
107+
}
108+
104109
let viewController = ProductVisibilityViewController(settings: settings) { (productSettings) in
105110
self.settings.password = productSettings.password
106111
self.settings.status = productSettings.status

0 commit comments

Comments
 (0)