From 4e5fa5cee93874b2cc29187bb6bac162a8ddbf48 Mon Sep 17 00:00:00 2001 From: Joel Thiessen <444632+joelclimbsthings@users.noreply.github.com> Date: Wed, 18 Nov 2020 15:54:24 -0800 Subject: [PATCH] Hiding primary tabs on Settings within WooCommerce since it's redundant with items in nav (https://github.com/woocommerce/woocommerce-admin/pull/5630) * Hiding tabs displayed on wc-status pages as well --- .../client/navigation/style.scss | 12 ++++++++++++ .../src/Features/Navigation/CoreMenu.php | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/plugins/woocommerce-admin/client/navigation/style.scss b/plugins/woocommerce-admin/client/navigation/style.scss index 7f95f123857..9d63d7884c6 100644 --- a/plugins/woocommerce-admin/client/navigation/style.scss +++ b/plugins/woocommerce-admin/client/navigation/style.scss @@ -11,6 +11,18 @@ display: none !important; } + &.woocommerce_page_wc-settings, + &.woocommerce_page_wc-status { + .woo-nav-tab-wrapper { + display: none; + } + + .woocommerce .subsubsub { + font-size: 14px; + margin: 5px 0; + } + } + #wpcontent, #wpfooter { margin-left: $navigation-width; diff --git a/plugins/woocommerce-admin/src/Features/Navigation/CoreMenu.php b/plugins/woocommerce-admin/src/Features/Navigation/CoreMenu.php index 5bd8b45ee13..f092d7fe7c0 100644 --- a/plugins/woocommerce-admin/src/Features/Navigation/CoreMenu.php +++ b/plugins/woocommerce-admin/src/Features/Navigation/CoreMenu.php @@ -187,6 +187,7 @@ class CoreMenu { 'capability' => 'manage_woocommerce', 'id' => 'system-status', 'url' => 'wc-status', + 'order' => 20, ), array( 'parent' => 'tools', @@ -195,6 +196,7 @@ class CoreMenu { 'id' => 'import-export', 'url' => 'import.php', 'migrate' => false, + 'order' => 10, ), array( 'parent' => 'tools', @@ -202,6 +204,23 @@ class CoreMenu { 'capability' => 'manage_woocommerce', 'id' => 'utilities', 'url' => 'admin.php?page=wc-status&tab=tools', + 'order' => 30, + ), + array( + 'parent' => 'tools', + 'title' => __( 'Logs', 'woocommerce-admin' ), + 'capability' => 'manage_woocommerce', + 'id' => 'logs', + 'url' => 'admin.php?page=wc-status&tab=logs', + 'order' => 40, + ), + array( + 'parent' => 'tools', + 'title' => __( 'Scheduled Actions', 'woocommerce-admin' ), + 'capability' => 'manage_woocommerce', + 'id' => 'scheduled_actions', + 'url' => 'admin.php?page=wc-status&tab=action-scheduler', + 'order' => 50, ), ), // WooCommerce Admin items.