File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
WooCommerce/Classes/Bookings Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -45,16 +45,18 @@ final class BookingsTabEligibilityChecker: BookingsTabEligibilityCheckerProtocol
4545 return false
4646 }
4747
48- async let hasBookableProducts = await checkIfStoreHasBookableProducts ( )
49- async let hasBookings = await checkIfStoreHasBookings ( )
50-
51- if await hasBookableProducts == false ,
52- await hasBookings == false {
53- return false
54- }
48+ // Check if store has bookable products or bookings
49+ let isVisible : Bool = await {
50+ if await checkIfStoreHasBookableProducts ( ) {
51+ return true
52+ } else if await checkIfStoreHasBookings ( ) {
53+ return true
54+ } else {
55+ return false
56+ }
57+ } ( )
5558
5659 // Cache the result
57- let isVisible = true
5860 userDefaults. cacheBookingsTabVisibility ( siteID: site. siteID, isVisible: isVisible)
5961
6062 return isVisible
You can’t perform that action at this time.
0 commit comments