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
_immediate( $this->get_process_item_hook(), [ $items ] ); } } /** * Check if this job is running. * * The job is considered to be running if a "create_batch" action is currently pending or in-progress. * * @param array|null $args * * @return bool */ protected function is_running( ?array $args = [] ): bool { return $this->action_scheduler->has_scheduled_action( $this->get_create_batch_hook(), $args ); } /** * Check if this job is processing the given items. * * The job is considered to be processing if a "process_item" action is currently pending or in-progress. * * @param array $items * * @return bool */ protected function is_processing( array $items = [] ): bool { return $this->action_scheduler->has_scheduled_action( $this->get_process_item_hook(), [ $items ] ); } /** * Called when the job is completed. * * @param int $final_batch_number The final batch number when the job was completed. * If equal to 1 then no items were processed by the job. */ protected function handle_complete( int $final_batch_number ) { // Optionally over-ride this method in child class. } /** * Get a single batch of items. * * If no items are returned the job will stop. * * @param int $batch_number The batch number increments for each new batch in the job cycle. * * @return array * * @throws Exception If an error occurs. The exception will be logged by ActionScheduler. */ abstract protected function get_batch( int $batch_number ): array; }
Warning: class_implements(): Class Automattic\WooCommerce\GoogleListingsAndAds\Jobs\UpdateAllProducts 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 Error: Class "Automattic\WooCommerce\GoogleListingsAndAds\Jobs\AbstractBatchedActionSchedulerJob" not found in /htdocs/wp-content/plugins/google-listings-and-ads/src/Jobs/AbstractProductSyncerBatchedJob.php:20 Stack trace: #0 /htdocs/wp-content/plugins/jetpack/vendor/jetpack-autoloader/class-php-autoloader.php(90): require() #1 /htdocs/wp-content/plugins/google-listings-and-ads/src/Jobs/UpdateAllProducts.php(20): Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackā“„13_5\al3_0_8\PHP_Autoloader::load_class('Automattic\\WooC...') #2 /htdocs/wp-content/plugins/jetpack/vendor/jetpack-autoloader/class-php-autoloader.php(90): require('/htdocs/wp-cont...') #3 [internal function]: Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackā“„13_5\al3_0_8\PHP_Autoloader::load_class('Automattic\\WooC...') #4 /htdocs/wp-content/plugins/google-listings-and-ads/src/Exception/ValidateInterface.php(22): class_implements('Automattic\\WooC...') #5 /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...') #6 /htdocs/wp-content/plugins/google-listings-and-ads/src/Internal/DependencyManagement/JobServiceProvider.php(99): Automattic\WooCommerce\GoogleListingsAndAds\Internal\DependencyManagement\JobServiceProvider->share_product_syncer_job('Automattic\\WooC...') #7 /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/ServiceProvider/ServiceProviderAggregate.php(102): Automattic\WooCommerce\GoogleListingsAndAds\Internal\DependencyManagement\JobServiceProvider->register() #8 /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...') #9 /htdocs/wp-content/plugins/google-listings-and-ads/src/Container.php(90): Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Container->get('Automattic\\WooC...') #10 /htdocs/wp-content/plugins/google-listings-and-ads/src/Infrastructure/GoogleListingsAndAdsPlugin.php(130): Automattic\WooCommerce\GoogleListingsAndAds\Container->get('Automattic\\WooC...') #11 /htdocs/wp-content/plugins/google-listings-and-ads/src/Infrastructure/GoogleListingsAndAdsPlugin.php(91): Automattic\WooCommerce\GoogleListingsAndAds\Infrastructure\GoogleListingsAndAdsPlugin->maybe_register_services() #12 /htdocs/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\GoogleListingsAndAds\Infrastructure\GoogleListingsAndAdsPlugin->Automattic\WooCommerce\GoogleListingsAndAds\Infrastructure\{closure}('') #13 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #14 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #15 /htdocs/wp-settings.php(578): do_action('plugins_loaded') #16 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #17 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #18 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #19 /htdocs/index.php(17): require('/htdocs/wp-blog...') #20 {main} thrown in /htdocs/wp-content/plugins/google-listings-and-ads/src/Jobs/AbstractProductSyncerBatchedJob.php on line 20