::class )->get_order_type( $order_id ); } /** * Helper method to generate admin url for an order. * * @param int $order_id Order ID. * * @return string Admin url for an order. */ public static function get_order_admin_edit_url( int $order_id ) : string { return wc_get_container()->get( PageController::class )->get_edit_url( $order_id ); } /** * Helper method to generate admin URL for new order. * * @return string Link for new order. */ public static function get_order_admin_new_url() : string { return wc_get_container()->get( PageController::class )->get_new_page_url(); } /** * Check if the current admin screen is an order list table. * * @param string $order_type Optional. The order type to check for. Default shop_order. * * @return bool */ public static function is_order_list_table_screen( $order_type = 'shop_order' ) : bool { return wc_get_container()->get( PageController::class )->is_order_screen( $order_type, 'list' ); } /** * Check if the current admin screen is for editing an order. * * @param string $order_type Optional. The order type to check for. Default shop_order. * * @return bool */ public static function is_order_edit_screen( $order_type = 'shop_order' ) : bool { return wc_get_container()->get( PageController::class )->is_order_screen( $order_type, 'edit' ); } /** * Check if the current admin screen is adding a new order. * * @param string $order_type Optional. The order type to check for. Default shop_order. * * @return bool */ public static function is_new_order_screen( $order_type = 'shop_order' ) : bool { return wc_get_container()->get( PageController::class )->is_order_screen( $order_type, 'new' ); } /** * Get the name of the database table that's currently in use for orders. * * @return string */ public static function get_table_for_orders() { return wc_get_container()->get( COTMigrationUtil::class )->get_table_for_orders(); } /** * Get the name of the database table that's currently in use for orders. * * @return string */ public static function get_table_for_order_meta() { return wc_get_container()->get( COTMigrationUtil::class )->get_table_for_order_meta(); } /** * Counts number of orders of a given type. * * @since 8.7.0 * * @param string $order_type Order type. * @return array Array of order counts indexed by order type. */ public static function get_count_for_type( $order_type ) { global $wpdb; $cache_key = \WC_Cache_Helper::get_cache_prefix( 'orders' ) . 'order-count-' . $order_type; $count_per_status = wp_cache_get( $cache_key, 'counts' ); if ( false === $count_per_status ) { if ( self::custom_orders_table_usage_is_enabled() ) { // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared $results = $wpdb->get_results( $wpdb->prepare( 'SELECT `status`, COUNT(*) AS `count` FROM ' . self::get_table_for_orders() . ' WHERE `type` = %s GROUP BY `status`', $order_type ), ARRAY_A ); // phpcs:enable $count_per_status = array_map( 'absint', array_column( $results, 'count', 'status' ) ); } else { $count_per_status = (array) wp_count_posts( $order_type ); } // Make sure all order statuses are included just in case. $count_per_status = array_merge( array_fill_keys( array_keys( wc_get_order_statuses() ), 0 ), $count_per_status ); wp_cache_set( $cache_key, $count_per_status, 'counts' ); } return $count_per_status; } }
Warning: class_implements(): Class Automattic\WooCommerce\Utilities\OrderUtil does not exist and could not be loaded in /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ServiceProviders/AbstractInterfaceServiceProvider.php on line 34

Warning: class_implements(): Class Automattic\WooCommerce\GoogleListingsAndAds\Tracking\Events\ActivatedEvents 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

Fatal error: Uncaught Error: Class "Automattic\WooCommerce\GoogleListingsAndAds\Tracking\Events\BaseEvent" not found in /htdocs/wp-content/plugins/google-listings-and-ads/src/Tracking/Events/ActivatedEvents.php:14 Stack trace: #0 /htdocs/wp-content/plugins/jetpack/vendor/jetpack-autoloader/class-php-autoloader.php(90): require() #1 [internal function]: Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackā“„13_5\al3_0_8\PHP_Autoloader::load_class('Automattic\\WooC...') #2 /htdocs/wp-content/plugins/google-listings-and-ads/src/Internal/DependencyManagement/AbstractServiceProvider.php(73): class_implements('Automattic\\WooC...') #3 /htdocs/wp-content/plugins/google-listings-and-ads/src/Internal/DependencyManagement/CoreServiceProvider.php(395): Automattic\WooCommerce\GoogleListingsAndAds\Internal\DependencyManagement\AbstractServiceProvider->share_with_tags('Automattic\\WooC...', Array) #4 /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/ServiceProvider/ServiceProviderAggregate.php(102): Automattic\WooCommerce\GoogleListingsAndAds\Internal\DependencyManagement\CoreServiceProvider->register() #5 /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...') #6 /htdocs/wp-content/plugins/google-listings-and-ads/src/Container.php(90): Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Container->get('Automattic\\WooC...') #7 /htdocs/wp-content/plugins/google-listings-and-ads/src/Infrastructure/GoogleListingsAndAdsPlugin.php(130): Automattic\WooCommerce\GoogleListingsAndAds\Container->get('Automattic\\WooC...') #8 /htdocs/wp-content/plugins/google-listings-and-ads/src/Infrastructure/GoogleListingsAndAdsPlugin.php(91): Automattic\WooCommerce\GoogleListingsAndAds\Infrastructure\GoogleListingsAndAdsPlugin->maybe_register_services() #9 /htdocs/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\GoogleListingsAndAds\Infrastructure\GoogleListingsAndAdsPlugin->Automattic\WooCommerce\GoogleListingsAndAds\Infrastructure\{closure}('') #10 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #11 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #12 /htdocs/wp-settings.php(559): do_action('plugins_loaded') #13 /htdocs/wp-config.php(85): 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/src/Tracking/Events/ActivatedEvents.php on line 14