tingsController; use Automattic\WooCommerce\GoogleListingsAndAds\API\Site\Controllers\MerchantCenter\SettingsSyncController; use Automattic\WooCommerce\GoogleListingsAndAds\API\Site\Controllers\MerchantCenter\ShippingRateBatchController; use Automattic\WooCommerce\GoogleListingsAndAds\API\Site\Controllers\MerchantCenter\ShippingRateController; use Automattic\WooCommerce\GoogleListingsAndAds\API\Site\Controllers\MerchantCenter\ShippingRateSuggestionsController; use Automattic\WooCommerce\GoogleListingsAndAds\API\Site\Controllers\MerchantCenter\ShippingTimeBatchController; use Automattic\WooCommerce\GoogleListingsAndAds\API\Site\Controllers\MerchantCenter\ShippingTimeController; use Automattic\WooCommerce\GoogleListingsAndAds\API\Site\Controllers\MerchantCenter\SupportedCountriesController; use Automattic\WooCommerce\GoogleListingsAndAds\API\Site\Controllers\MerchantCenter\SyncableProductsCountController; use Automattic\WooCommerce\GoogleListingsAndAds\API\Site\Controllers\MerchantCenter\TargetAudienceController; use Automattic\WooCommerce\GoogleListingsAndAds\DB\ProductFeedQueryHelper; use Automattic\WooCommerce\GoogleListingsAndAds\DB\Query\AttributeMappingRulesQuery; use Automattic\WooCommerce\GoogleListingsAndAds\DB\Query\BudgetRecommendationQuery; use Automattic\WooCommerce\GoogleListingsAndAds\DB\Query\MerchantIssueQuery; use Automattic\WooCommerce\GoogleListingsAndAds\DB\Query\ShippingRateQuery; use Automattic\WooCommerce\GoogleListingsAndAds\Google\RequestReviewStatuses; use Automattic\WooCommerce\GoogleListingsAndAds\Google\GoogleHelper; use Automattic\WooCommerce\GoogleListingsAndAds\Jobs\JobRepository; use Automattic\WooCommerce\GoogleListingsAndAds\Jobs\ProductSyncStats; use Automattic\WooCommerce\GoogleListingsAndAds\MerchantCenter\AccountService as MerchantAccountService; use Automattic\WooCommerce\GoogleListingsAndAds\MerchantCenter\MerchantStatuses; use Automattic\WooCommerce\GoogleListingsAndAds\MerchantCenter\ContactInformation; use Automattic\WooCommerce\GoogleListingsAndAds\MerchantCenter\PhoneVerification; use Automattic\WooCommerce\GoogleListingsAndAds\MerchantCenter\PolicyComplianceCheck; use Automattic\WooCommerce\GoogleListingsAndAds\Options\TransientsInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Product\AttributeMapping\AttributeMappingHelper; use Automattic\WooCommerce\GoogleListingsAndAds\Product\ProductHelper; use Automattic\WooCommerce\GoogleListingsAndAds\Proxies\RESTServer; use Automattic\WooCommerce\GoogleListingsAndAds\Proxies\WC; use Automattic\WooCommerce\GoogleListingsAndAds\Proxies\WP; use Automattic\WooCommerce\GoogleListingsAndAds\Shipping\ShippingSuggestionService; use Automattic\WooCommerce\GoogleListingsAndAds\Shipping\ShippingZone; use Automattic\WooCommerce\GoogleListingsAndAds\Utility\AddressUtility; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Definition\DefinitionInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\Psr\Container\ContainerInterface; /** * Class RESTServiceProvider * * @package Automattic\WooCommerce\GoogleListingsAndAds\Internal\DependencyManagement */ class RESTServiceProvider extends AbstractServiceProvider { /** * Returns a boolean if checking whether this provider provides a specific * service or returns an array of provided services if no argument passed. * * @param string $service * * @return boolean */ public function provides( string $service ): bool { return 'rest_controller' === $service; } /** * 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() { $this->share( SettingsController::class ); $this->share( ConnectionController::class ); $this->share( AdsAccountController::class, AdsAccountService::class ); $this->share( AdsCampaignController::class, AdsCampaign::class ); $this->share( AdsAssetGroupController::class, AdsAssetGroup::class ); $this->share_with_container( AdsReportsController::class ); $this->share( GoogleAccountController::class, Connection::class ); $this->share( JetpackAccountController::class, Manager::class, Middleware::class ); $this->share( MerchantCenterProductStatsController::class, MerchantStatuses::class, ProductSyncStats::class ); $this->share( MerchantCenterIssuesController::class, MerchantStatuses::class, ProductHelper::class ); $this->share( MerchantCenterProductFeedController::class, ProductFeedQueryHelper::class ); $this->share( MerchantCenterProductVisibilityController::class, ProductHelper::class, MerchantIssueQuery::class ); $this->share( MerchantCenterContactInformationController::class, ContactInformation::class, Settings::class, AddressUtility::class ); $this->share( AdsBudgetRecommendationController::class, BudgetRecommendationQuery::class, Ads::class ); $this->share( PhoneVerificationController::class, PhoneVerification::class ); $this->share( MerchantCenterAccountController::class, MerchantAccountService::class ); $this->share( MerchantCenterRequestReviewController::class, Middleware::class, RequestReviewStatuses::class, TransientsInterface::class ); $this->share_with_container( MerchantCenterReportsController::class ); $this->share( ShippingRateBatchController::class, ShippingRateQuery::class ); $this->share( ShippingRateController::class, ShippingRateQuery::class ); $this->share( ShippingRateSuggestionsController::class, ShippingSuggestionService::class ); $this->share_with_container( ShippingTimeBatchController::class ); $this->share_with_container( ShippingTimeController::class ); $this->share( TargetAudienceController::class, WP::class, WC::class, ShippingZone::class, GoogleHelper::class ); $this->share( SupportedCountriesController::class, WC::class, GoogleHelper::class ); $this->share( SettingsSyncController::class, Settings::class ); $this->share( DisconnectController::class ); $this->share( SetupCompleteController::class ); $this->share( AssetSuggestionsController::class, AdsAssetSuggestionsService::class ); $this->share( SyncableProductsCountController::class, JobRepository::class ); $this->share( PolicyComplianceCheckController::class, PolicyComplianceCheck::class ); $this->share( AttributeMappingDataController::class, AttributeMappingHelper::class ); $this->share( AttributeMappingRulesController::class, AttributeMappingHelper::class, AttributeMappingRulesQuery::class ); $this->share( AttributeMappingCategoriesController::class ); $this->share( AttributeMappingSyncerController::class, ProductSyncStats::class ); $this->share( TourController::class ); } /** * Share a class. * * Overridden to include the RESTServer proxy with all classes. * * @param string $class The class name to add. * @param mixed ...$arguments Constructor arguments for the class. * * @return DefinitionInterface */ protected function share( string $class, ...$arguments ): DefinitionInterface { return parent::share( $class, RESTServer::class, ...$arguments )->addTag( 'rest_controller' ); } /** * Share a class with only the container object provided. * * @param string $class The class name to add. * * @return DefinitionInterface */ protected function share_with_container( string $class ): DefinitionInterface { return parent::share( $class, ContainerInterface::class )->addTag( 'rest_controller' ); } }
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(91): 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(70): Automattic\WooCommerce\GoogleListingsAndAds\PluginFactory::instance() #5 /htdocs/wp-includes/class-wp-hook.php(310): {closure}('') #6 /htdocs/wp-includes/class-wp-hook.php(334): 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(204): do_action('woocommerce_loa...') #9 /htdocs/wp-includes/class-wp-hook.php(310): WooCommerce->on_plugins_loaded('') #10 /htdocs/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #11 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #12 /htdocs/wp-settings.php(495): do_action('plugins_loaded') #13 /htdocs/wp-config.php(96): 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