@since 2.3.0 * @return array */ function wc_get_webhook_statuses() { return apply_filters( 'woocommerce_webhook_statuses', array( 'active' => __( 'Active', 'woocommerce' ), 'paused' => __( 'Paused', 'woocommerce' ), 'disabled' => __( 'Disabled', 'woocommerce' ), ) ); } /** * Load webhooks. * * @since 3.3.0 * @throws Exception If webhook cannot be read/found and $data parameter of WC_Webhook class constructor is set. * @param string $status Optional - status to filter results by. Must be a key in return value of @see wc_get_webhook_statuses(). @since 3.5.0. * @param null|int $limit Limit number of webhooks loaded. @since 3.6.0. * @return bool */ function wc_load_webhooks( $status = '', $limit = null ) { // short-circuit if webhooks should not be loaded at all. if ( ! is_null( $limit ) && $limit <= 0 ) { return false; } $data_store = WC_Data_Store::load( 'webhook' ); $webhooks = $data_store->get_webhooks_ids( $status ); $loaded = 0; foreach ( $webhooks as $webhook_id ) { if ( ! is_null( $limit ) && $loaded >= $limit ) { break; } $webhook = new WC_Webhook( $webhook_id ); $webhook->enqueue(); $loaded ++; } return 0 < $loaded; } /** * Get webhook. * * @param int|WC_Webhook $id Webhook ID or object. * @throws Exception If webhook cannot be read/found and $data parameter of WC_Webhook class constructor is set. * @return WC_Webhook|null */ function wc_get_webhook( $id ) { $webhook = new WC_Webhook( $id ); return 0 !== $webhook->get_id() ? $webhook : null; } /** * Get webhoook REST API versions. * * @since 3.5.1 * @return array */ function wc_get_webhook_rest_api_versions() { return array( 'wp_api_v1', 'wp_api_v2', 'wp_api_v3', ); }
Fatal error: Uncaught Error: Class "Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Argument\RawArgument" not found in /htdocs/wp-content/plugins/google-listings-and-ads/src/Internal/DependencyManagement/ThirdPartyServiceProvider.php:49 Stack trace: #0 /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/ServiceProvider/ServiceProviderAggregate.php(102): Automattic\WooCommerce\GoogleListingsAndAds\Internal\DependencyManagement\ThirdPartyServiceProvider->register() #1 /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\\Jetp...') #2 /htdocs/wp-content/plugins/google-listings-and-ads/src/Container.php(90): Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Container->get('Automattic\\Jetp...') #3 /htdocs/wp-content/plugins/google-listings-and-ads/google-listings-and-ads.php(110): Automattic\WooCommerce\GoogleListingsAndAds\Container->get('Automattic\\Jetp...') #4 /htdocs/wp-includes/class-wp-hook.php(324): {closure}('') #5 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #6 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #7 /htdocs/wp-settings.php(559): do_action('plugins_loaded') #8 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #9 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #10 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #11 /htdocs/index.php(17): require('/htdocs/wp-blog...') #12 {main} thrown in /htdocs/wp-content/plugins/google-listings-and-ads/src/Internal/DependencyManagement/ThirdPartyServiceProvider.php on line 49