rebase from live enviornment

This commit is contained in:
Rachit Bhargava
2024-01-09 22:14:20 -05:00
parent ff0b49a046
commit 3a22fcaa4a
15968 changed files with 2344674 additions and 45234 deletions

View File

@@ -11,6 +11,8 @@ use Automattic\WooCommerce\Admin\PageController;
use Automattic\WooCommerce\Internal\Admin\Marketplace;
use Automattic\WooCommerce\Internal\Admin\Orders\COTRedirectionController;
use Automattic\WooCommerce\Internal\Admin\Orders\PageController as Custom_Orders_PageController;
use Automattic\WooCommerce\Internal\Admin\Logging\PageController as LoggingPageController;
use Automattic\WooCommerce\Internal\Admin\Logging\FileV2\ListTable as LoggingListTable;
use Automattic\WooCommerce\Internal\Admin\WCAdminAssets;
use Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController;
use Automattic\WooCommerce\Utilities\FeaturesUtil;
@@ -184,7 +186,18 @@ class WC_Admin_Menus {
* Add menu item.
*/
public function status_menu() {
add_submenu_page( 'woocommerce', __( 'WooCommerce status', 'woocommerce' ), __( 'Status', 'woocommerce' ), 'manage_woocommerce', 'wc-status', array( $this, 'status_page' ) );
$status_page = add_submenu_page( 'woocommerce', __( 'WooCommerce status', 'woocommerce' ), __( 'Status', 'woocommerce' ), 'manage_woocommerce', 'wc-status', array( $this, 'status_page' ) );
add_action(
'load-' . $status_page,
function() {
if ( 'logs' === filter_input( INPUT_GET, 'tab' ) ) {
// Initialize the logging page controller early so that it can hook into things.
wc_get_container()->get( LoggingPageController::class );
}
},
1
);
}
/**
@@ -308,7 +321,13 @@ class WC_Admin_Menus {
* @param int $value The number of rows to use.
*/
public function set_screen_option( $status, $option, $value ) {
if ( in_array( $option, array( 'woocommerce_keys_per_page', 'woocommerce_webhooks_per_page' ), true ) ) {
$screen_options = array(
'woocommerce_keys_per_page',
'woocommerce_webhooks_per_page',
LoggingListTable::PER_PAGE_USER_OPTION_KEY,
);
if ( in_array( $option, $screen_options, true ) ) {
return $value;
}