on get_post_or_order_id( $post_or_order_object ) : int { if ( is_numeric( $post_or_order_object ) ) { return (int) $post_or_order_object; } elseif ( $post_or_order_object instanceof WC_Order ) { return $post_or_order_object->get_id(); } elseif ( $post_or_order_object instanceof WP_Post ) { return $post_or_order_object->ID; } return 0; } /** * Checks if passed id, post or order object is a WC_Order object. * * @param int|WP_Post|WC_Order $order_id Order ID, post object or order object. * @param string[] $types Types to match against. * * @return bool Whether the passed param is an order. */ public function is_order( $order_id, array $types = array( 'shop_order' ) ) : bool { $order_id = $this->get_post_or_order_id( $order_id ); $order_data_store = \WC_Data_Store::load( 'order' ); return in_array( $order_data_store->get_order_type( $order_id ), $types, true ); } /** * Returns type pf passed id, post or order object. * * @param int|WP_Post|WC_Order $order_id Order ID, post object or order object. * * @return string|null Type of the order. */ public function get_order_type( $order_id ) { $order_id = $this->get_post_or_order_id( $order_id ); $order_data_store = \WC_Data_Store::load( 'order' ); return $order_data_store->get_order_type( $order_id ); } /** * Get the name of the database table that's currently in use for orders. * * @return string */ public function get_table_for_orders() { if ( $this->custom_orders_table_usage_is_enabled() ) { $table_name = OrdersTableDataStore::get_orders_table_name(); } else { global $wpdb; $table_name = $wpdb->posts; } return $table_name; } /** * Get the name of the database table that's currently in use for orders. * * @return string */ public function get_table_for_order_meta() { if ( $this->custom_orders_table_usage_is_enabled() ) { $table_name = OrdersTableDataStore::get_meta_table_name(); } else { global $wpdb; $table_name = $wpdb->postmeta; } return $table_name; } }
Warning: class_implements(): Class Automattic\WooCommerce\Internal\Utilities\COTMigrationUtil 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\Internal\DeprecatedFilters 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
_json_api_request_as_blog( sprintf( '/sites/%d/rewind', $site_id ) . '?force=wpcom', '2', array( 'timeout' => 2 ), null, 'wpcom' ); if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { return new WP_Error( 'rewind_state_fetch_failed' ); } $body = wp_remote_retrieve_body( $response ); $status = json_decode( $body ); return $status; } /** * Checks whether the current plan (or purchases) of the site already supports the product * * @return boolean */ public static function has_paid_plan_for_product() { $rewind_data = static::get_state_from_wpcom(); if ( is_wp_error( $rewind_data ) ) { return false; } return is_object( $rewind_data ) && isset( $rewind_data->state ) && 'unavailable' !== $rewind_data->state; } /** * Return product bundles list * that supports the product. * * @return boolean|array Products bundle list. */ public static function is_upgradable_by_bundle() { return array( 'security' ); } /** * Get the URL the user is taken after activating the product * * @return ?string */ public static function get_post_activation_url() { return ''; // stay in My Jetpack page or continue the purchase flow if needed. } /** * Get the URL where the user manages the product * * @return ?string */ public static function get_manage_url() { // check standalone first if ( static::is_standalone_plugin_active() ) { return admin_url( 'admin.php?page=jetpack-backup' ); // otherwise, check for the main Jetpack plugin } elseif ( static::is_jetpack_plugin_active() ) { return Redirect::get_url( 'my-jetpack-manage-backup' ); } } }
Fatal error: Uncaught Error: Class "Automattic\Jetpack\My_Jetpack\Products\Backup" not found in /htdocs/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php:192 Stack trace: #0 /htdocs/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php(80): Automattic\Jetpack\My_Jetpack\Products::extend_plugins_action_links() #1 /htdocs/wp-content/plugins/jetpack/class.jetpack.php(976): Automattic\Jetpack\My_Jetpack\Initializer::init() #2 /htdocs/wp-includes/class-wp-hook.php(324): Jetpack->late_initialization('') #3 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #4 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /htdocs/wp-settings.php(578): do_action('plugins_loaded') #6 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #7 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #8 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #9 /htdocs/index.php(17): require('/htdocs/wp-blog...') #10 {main} thrown in /htdocs/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php on line 192