Merged in feature/117-dev-dev01 (pull request #8)
auto-patch 117-dev-dev01-2023-12-15T16_09_06 * auto-patch 117-dev-dev01-2023-12-15T16_09_06
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user