n get_product_listings_status(): string { if ( ! $this->merchant_center->is_ready_for_syncing() ) { return self::PRODUCT_LISTINGS_NOT_APPLICABLE; } return $this->product_sync_stats->get_count() > 0 ? self::PRODUCT_LISTINGS_SYNC_IN_PROGRESS : self::PRODUCT_LISTINGS_SYNCED; } /** * Returns the number of channel issues/errors (e.g. account-related errors, product synchronization issues, etc.). * * @return int The number of issues to resolve, or 0 if there are no issues with the channel. */ public function get_errors_count(): int { try { return $this->merchant_statuses->get_issues()['total']; } catch ( Exception $e ) { return 0; } } /** * Returns an array of marketing campaign types that the channel supports. * * @return MarketingCampaignType[] Array of marketing campaign type objects. */ public function get_supported_campaign_types(): array { return $this->campaign_types; } /** * Returns an array of the channel's marketing campaigns. * * @return MarketingCampaign[] */ public function get_campaigns(): array { if ( ! $this->ads->ads_id_exists() || ! $this->is_mcm_enabled() ) { return []; } try { $currency = $this->ads->get_ads_currency(); return array_map( function ( array $campaign_data ) use ( $currency ) { $cost = null; if ( isset( $campaign_data['amount'] ) ) { $cost = new Price( (string) $campaign_data['amount'], $currency ); } return new MarketingCampaign( (string) $campaign_data['id'], $this->campaign_types['google-ads'], $campaign_data['name'], admin_url( 'admin.php?page=wc-admin&path=/google/dashboard&subpath=/campaigns/edit&programId=' . $campaign_data['id'] ), $cost, ); }, $this->ads_campaign->get_campaigns() ); } catch ( ExceptionWithResponseData $e ) { return []; } } /** * Generate an array of supported marketing campaign types. * * @return MarketingCampaignType[] */ protected function generate_campaign_types(): array { return [ 'google-ads' => new MarketingCampaignType( 'google-ads', $this, 'Google Ads', 'Boost your product listings with a campaign that is automatically optimized to meet your goals.', admin_url( 'admin.php?page=wc-admin&path=/google/dashboard&subpath=/campaigns/create' ), $this->get_icon_url() ), ]; } }
Warning: class_implements(): Class Automattic\WooCommerce\GoogleListingsAndAds\MultichannelMarketing\GLAChannel does not exist and could not be loaded in /htdocs/wp-content/plugins/google-listings-and-ads/src/Internal/DependencyManagement/AbstractServiceProvider.php on line 73

Warning: foreach() argument must be of type array|object, bool given in /htdocs/wp-content/plugins/google-listings-and-ads/src/Internal/DependencyManagement/AbstractServiceProvider.php on line 73

Warning: class_implements(): Class Automattic\WooCommerce\GoogleListingsAndAds\Jobs\CleanupProductsJob does not exist and could not be loaded in /htdocs/wp-content/plugins/google-listings-and-ads/src/Exception/ValidateInterface.php on line 22

Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, bool given in /htdocs/wp-content/plugins/google-listings-and-ads/src/Exception/ValidateInterface.php:23 Stack trace: #0 /htdocs/wp-content/plugins/google-listings-and-ads/src/Exception/ValidateInterface.php(23): array_key_exists('Automattic\\WooC...', false) #1 /htdocs/wp-content/plugins/google-listings-and-ads/src/Internal/DependencyManagement/JobServiceProvider.php(181): Automattic\WooCommerce\GoogleListingsAndAds\Internal\DependencyManagement\JobServiceProvider->validate_interface('Automattic\\WooC...', 'Automattic\\WooC...') #2 /htdocs/wp-content/plugins/google-listings-and-ads/src/Internal/DependencyManagement/JobServiceProvider.php(104): Automattic\WooCommerce\GoogleListingsAndAds\Internal\DependencyManagement\JobServiceProvider->share_product_syncer_job('Automattic\\WooC...') #3 /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/ServiceProvider/ServiceProviderAggregate.php(102): Automattic\WooCommerce\GoogleListingsAndAds\Internal\DependencyManagement\JobServiceProvider->register() #4 /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/Container.php(172): Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\ServiceProvider\ServiceProviderAggregate->register('Automattic\\WooC...') #5 /htdocs/wp-content/plugins/google-listings-and-ads/src/Container.php(90): Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Container->get('Automattic\\WooC...') #6 /htdocs/wp-content/plugins/google-listings-and-ads/src/Infrastructure/GoogleListingsAndAdsPlugin.php(130): Automattic\WooCommerce\GoogleListingsAndAds\Container->get('Automattic\\WooC...') #7 /htdocs/wp-content/plugins/google-listings-and-ads/src/Infrastructure/GoogleListingsAndAdsPlugin.php(91): Automattic\WooCommerce\GoogleListingsAndAds\Infrastructure\GoogleListingsAndAdsPlugin->maybe_register_services() #8 /htdocs/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\GoogleListingsAndAds\Infrastructure\GoogleListingsAndAdsPlugin->Automattic\WooCommerce\GoogleListingsAndAds\Infrastructure\{closure}('') #9 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #10 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #11 /htdocs/wp-settings.php(559): do_action('plugins_loaded') #12 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #13 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #14 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #15 /htdocs/index.php(17): require('/htdocs/wp-blog...') #16 {main} thrown in /htdocs/wp-content/plugins/google-listings-and-ads/src/Exception/ValidateInterface.php on line 23