From e4e93b1cbe4cd436b5a09896b60de7d623074bb0 Mon Sep 17 00:00:00 2001 From: mikkamp Date: Wed, 18 Dec 2024 17:08:22 +0000 Subject: [PATCH] Adjust conditions for MCM --- src/Internal/DependencyManagement/CoreServiceProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Internal/DependencyManagement/CoreServiceProvider.php b/src/Internal/DependencyManagement/CoreServiceProvider.php index 4f20dced2c..f17032ba79 100644 --- a/src/Internal/DependencyManagement/CoreServiceProvider.php +++ b/src/Internal/DependencyManagement/CoreServiceProvider.php @@ -3,6 +3,7 @@ namespace Automattic\WooCommerce\GoogleListingsAndAds\Internal\DependencyManagement; +use Automattic\WooCommerce\Admin\Marketing\MarketingChannels; use Automattic\WooCommerce\GoogleListingsAndAds\ActionScheduler\ActionScheduler; use Automattic\WooCommerce\GoogleListingsAndAds\Admin\Redirect; use Automattic\WooCommerce\GoogleListingsAndAds\Admin\Admin; @@ -429,7 +430,7 @@ function ( ...$arguments ) { // Share Attribute Mapping related classes $this->share_with_tags( AttributeMappingHelper::class ); - if ( defined( 'WC_MCM_EXISTS' ) ) { + if ( class_exists( MarketingChannels::class ) ) { $this->share_with_tags( GLAChannel::class, MerchantCenterService::class, AdsCampaign::class, Ads::class, MerchantStatuses::class, ProductSyncStats::class ); $this->share_with_tags( MarketingChannelRegistrar::class, GLAChannel::class, WC::class ); }