File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
WooCommerce/Classes/Blaze Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,14 @@ protocol BlazeEligibilityCheckerProtocol {
1313/// Checks for Blaze eligibility for a site and its products.
1414final class BlazeEligibilityChecker : BlazeEligibilityCheckerProtocol {
1515 private let stores : StoresManager
16+ private let siteCIABEligibilityChecker : CIABEligibilityCheckerProtocol
1617
17- init ( stores: StoresManager = ServiceLocator . stores) {
18+ init (
19+ stores: StoresManager = ServiceLocator . stores,
20+ siteCIABEligibilityChecker: CIABEligibilityCheckerProtocol = CIABEligibilityChecker ( )
21+ ) {
1822 self . stores = stores
23+ self . siteCIABEligibilityChecker = siteCIABEligibilityChecker
1924 }
2025
2126 /// Checks if the site is eligible for Blaze.
@@ -39,7 +44,11 @@ final class BlazeEligibilityChecker: BlazeEligibilityCheckerProtocol {
3944private extension BlazeEligibilityChecker {
4045 @MainActor
4146 func checkSiteEligibility( _ site: Site ) async -> Bool {
42- guard site. isAdmin && site. canBlaze else {
47+ guard
48+ site. isAdmin,
49+ site. canBlaze,
50+ siteCIABEligibilityChecker. isFeatureSupported ( . blaze, for: site)
51+ else {
4352 return false
4453 }
4554
You can’t perform that action at this time.
0 commit comments