n the hook triggers. * * @return int The action ID. */ public function enqueue_async_action( string $hook, $args = [] ): int { $this->async_runner->attach_shutdown_hook(); return $this->schedule_immediate( $hook, $args ); } /** * Check if there is an existing action in the queue with a given hook and args combination. * * An action in the queue could be pending, in-progress or async. If the action is pending for a time in * future, currently being run, or an async action sitting in the queue waiting to be processed, boolean * true will be returned. Or there may be no async, in-progress or pending action for this hook, in which * case, boolean false will be the return value. * * @param string $hook * @param array|null $args * * @return bool True if there is a pending scheduled, async or in-progress action in the queue or false if there is no matching action. */ public function has_scheduled_action( string $hook, $args = [] ): bool { return ( false !== as_next_scheduled_action( $hook, $args, $this->get_slug() ) ); } /** * Search for scheduled actions. * * @param array|null $args See as_get_scheduled_actions() for possible arguments. * @param string $return_format OBJECT, ARRAY_A, or ids. * * @return array */ public function search( $args = [], $return_format = OBJECT ): array { $args['group'] = $this->get_slug(); return as_get_scheduled_actions( $args, $return_format ); } /** * Cancel the next scheduled instance of an action with a matching hook (and optionally matching args). * * Any recurring actions with a matching hook should also be cancelled, not just the next scheduled action. * * @param string $hook The hook that the job will trigger. * @param array|null $args Args that would have been passed to the job. * * @return int The scheduled action ID if a scheduled action was found. * * @throws ActionSchedulerException If no matching action found. */ public function cancel( string $hook, $args = [] ) { $action_id = as_unschedule_action( $hook, $args, $this->get_slug() ); if ( null === $action_id ) { throw ActionSchedulerException::action_not_found( $hook ); } return $action_id; } /** * Retrieve an action. * * @param int $action_id Action ID. * * @return ActionScheduler_Action * * @since 1.7.0 */ public function fetch_action( int $action_id ): ActionScheduler_Action { return ActionSchedulerCore::store()->fetch_action( $action_id ); } }
Warning: class_implements(): Class Automattic\WooCommerce\GoogleListingsAndAds\ActionScheduler\ActionScheduler 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(578): 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