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 ); }