=> true, ProductSyncStats::class => true, Service::class => true, JobRepository::class => true, ]; /** * Use the register method to register items with the container via the * protected $this->leagueContainer property or the `getLeagueContainer` method * from the ContainerAwareTrait. * * @return void */ public function register(): void { $this->share_with_tags( AsyncActionRunner::class, new QueueRunnerAsyncRequest( ActionSchedulerCore::store() ), ActionSchedulerCore::lock() ); $this->share_with_tags( ActionScheduler::class, AsyncActionRunner::class ); $this->share_with_tags( ActionSchedulerJobMonitor::class, ActionScheduler::class ); $this->share_with_tags( ProductSyncStats::class, ActionScheduler::class ); // share product syncer jobs $this->share_product_syncer_job( UpdateAllProducts::class ); $this->share_product_syncer_job( DeleteAllProducts::class ); $this->share_product_syncer_job( UpdateProducts::class ); $this->share_product_syncer_job( DeleteProducts::class ); $this->share_product_syncer_job( ResubmitExpiringProducts::class ); $this->share_product_syncer_job( CleanupProductsJob::class ); $this->share_product_syncer_job( CleanupSyncedProducts::class ); // share coupon syncer jobs. $this->share_coupon_syncer_job( UpdateCoupon::class ); $this->share_coupon_syncer_job( DeleteCoupon::class ); $this->share_with_tags( JobRepository::class, JobInterface::class ); $this->conditionally_share_with_tags( JobInitializer::class, JobRepository::class, ActionScheduler::class ); $this->share_with_tags( Product\SyncerHooks::class, BatchProductHelper::class, ProductHelper::class, JobRepository::class, MerchantCenterService::class, WC::class ); $this->share_with_tags( Coupon\SyncerHooks::class, CouponHelper::class, JobRepository::class, MerchantCenterService::class, WC::class ); $this->share_with_tags( StartProductSync::class, JobRepository::class ); $this->share_with_tags( PluginUpdate::class, JobRepository::class ); // Share shipping settings syncer job and hooks. $this->share_action_scheduler_job( UpdateShippingSettings::class, MerchantCenterService::class, GoogleSettings::class ); $this->share_with_tags( Shipping\SyncerHooks::class, MerchantCenterService::class, GoogleSettings::class, JobRepository::class ); // Share plugin update jobs $this->share_product_syncer_job( CleanupProductTargetCountriesJob::class ); // Share update syncable products count job $this->share_action_scheduler_job( UpdateSyncableProductsCount::class, ProductRepository::class, ProductHelper::class ); $this->share_action_scheduler_job( UpdateMerchantProductStatuses::class, MerchantCenterService::class, MerchantReport::class, MerchantStatuses::class ); } /** * Share an ActionScheduler job class * * @param string $class_name The class name to add. * @param mixed ...$arguments Constructor arguments for the class. * * @throws InvalidClass When the given class does not implement the ActionSchedulerJobInterface. */ protected function share_action_scheduler_job( string $class_name, ...$arguments ) { $this->validate_interface( $class_name, ActionSchedulerJobInterface::class ); $this->share_with_tags( $class_name, ActionScheduler::class, ActionSchedulerJobMonitor::class, ...$arguments ); } /** * Share a product syncer job class * * @param string $class_name The class name to add. * @param mixed ...$arguments Constructor arguments for the class. * * @throws InvalidClass When the given class does not implement the ProductSyncerJobInterface. */ protected function share_product_syncer_job( string $class_name, ...$arguments ) { $this->validate_interface( $class_name, ProductSyncerJobInterface::class ); if ( is_subclass_of( $class_name, AbstractProductSyncerBatchedJob::class ) ) { $this->share_action_scheduler_job( $class_name, ProductSyncer::class, ProductRepository::class, BatchProductHelper::class, MerchantCenterService::class, MerchantStatuses::class, ...$arguments ); } else { $this->share_action_scheduler_job( $class_name, ProductSyncer::class, ProductRepository::class, MerchantCenterService::class, ...$arguments ); } } /** * Share a coupon syncer job class * * @param string $class_name The class name to add. * @param mixed ...$arguments Constructor arguments for the class. * * @throws InvalidClass When the given class does not implement the ProductSyncerJobInterface. */ protected function share_coupon_syncer_job( string $class_name, ...$arguments ) { // Coupon related jobs also should implement ProductSyncerJobInterface. $this->validate_interface( $class_name, ProductSyncerJobInterface::class ); $this->share_action_scheduler_job( $class_name, CouponHelper::class, CouponSyncer::class, WC::class, MerchantCenterService::class, ...$arguments ); } }
Fatal error: Uncaught Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Exception\ContainerException: A service provider must be a fully qualified class name or instance of (\League\Container\ServiceProvider\ServiceProviderInterface) in /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/ServiceProvider/ServiceProviderAggregate.php:52 Stack trace: #0 /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/Container.php(146): Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\ServiceProvider\ServiceProviderAggregate->add('Automattic\\WooC...') #1 /htdocs/wp-content/plugins/google-listings-and-ads/src/Container.php(75): Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Container->addServiceProvider('Automattic\\WooC...') #2 /htdocs/wp-content/plugins/google-listings-and-ads/google-listings-and-ads.php(93): Automattic\WooCommerce\GoogleListingsAndAds\Container->__construct() #3 /htdocs/wp-content/plugins/google-listings-and-ads/src/PluginFactory.php(25): woogle_get_container() #4 /htdocs/wp-content/plugins/google-listings-and-ads/google-listings-and-ads.php(72): Automattic\WooCommerce\GoogleListingsAndAds\PluginFactory::instance() #5 /htdocs/wp-includes/class-wp-hook.php(324): {closure}('') #6 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #7 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #8 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(218): do_action('woocommerce_loa...') #9 /htdocs/wp-includes/class-wp-hook.php(324): WooCommerce->on_plugins_loaded('') #10 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #11 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #12 /htdocs/wp-settings.php(559): do_action('plugins_loaded') #13 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #14 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #15 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #16 /htdocs/index.php(17): require('/htdocs/wp-blog...') #17 {main} thrown in /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/ServiceProvider/ServiceProviderAggregate.php on line 52