registerCurrencyCompatibility($context); $this->registerContainerCompatibility($context); $this->registerAddonsCompatibility($context); return $context; } protected function registerContainerCompatibility(Context $context) { $context->getContainerCompatibilityManager()->register(new SomewhereWarmBundlesCmp($context)); $context->getContainerCompatibilityManager()->register(new WpcBundleCmp($context)); $context->getContainerCompatibilityManager()->register(new AsanaEasyBundlesCmp($context)); $context->getContainerCompatibilityManager()->register(new WpcCompositeCmp($context)); $context->getContainerCompatibilityManager()->register(new MixAndMatchCmp($context)); $context->getContainerCompatibilityManager()->register(new YithBundlesCmp($context)); $context->getContainerCompatibilityManager()->register(new SomewhereWarmCompositesCmp($context)); } protected function registerCurrencyCompatibility(Context $context) { $woocsCmp = new WoocsCmp(); if ($woocsCmp->isActive()) { $woocsCmp->modifyContext($context); $woocsCmp->prepareHooks(); } $villaCmp = new VillaThemeMultiCurrencyCmp(); if ($villaCmp->isActive()) { $villaCmp->modifyContext($context); $villaCmp->prepareHooks(); } $aeliaCmp = new AeliaSwitcherCmp(); if ($aeliaCmp->isActive()) { $aeliaCmp->modifyContext($context); $aeliaCmp->prepareHooks(); } $algCmp = new AlgWcCurrencySwitcherCmp(); if ($algCmp->isActive()) { $algCmp->modifyContext($context); } $yayCmp = new YayCurrencyCmp(); if ($yayCmp->isActive()) { $yayCmp->modifyContext($context); $yayCmp->prepareHooks(); } $pcgCmp = new WcPgCurrencyCmp(); if($pcgCmp->isActive()) { $pcgCmp->modifyContext($context); $pcgCmp->prepareHooks(); } $priceBasedOnCountryCmp = new PriceBasedOnCountryCmp(); if ($priceBasedOnCountryCmp->isActive()) { $priceBasedOnCountryCmp->modifyContext($context); $priceBasedOnCountryCmp->prepareHooks(); } $asanaEasyBundlesCmp = new AsanaEasyBundlesCmp($context); if($asanaEasyBundlesCmp->isActive()) { $asanaEasyBundlesCmp->prepareHooks(); } $yithBundlesCmp = new YithBundlesCmp($context); if($yithBundlesCmp->isActive()) { $yithBundlesCmp->prepareHooks(); } $wcMultiCurrencyCmp = new WooCommerceMultiCurrencyCmp($context); } protected function registerAddonsCompatibility(Context $context) { /** @var TmExtraOptionsCmp $tmExtraOptionsCmp */ $tmExtraOptionsCmp = Factory::get("Compatibility_Addons_TmExtraOptionsCmp", $context); $tmExtraOptionsCmp->register(); if (class_exists(Factory::getClassName("Compatibility_Addons_WpcGroupedProductCmp"))) { /** @var WpcGroupedProductCmp $wpcGroupedProductCmp */ $wpcGroupedProductCmp = Factory::get("Compatibility_Addons_WpcGroupedProductCmp", $context); $wpcGroupedProductCmp->register(); } } }