Use settings tabs filter to get setting pages for nav (https://github.com/woocommerce/woocommerce-admin/pull/6116)
This commit is contained in:
parent
592a4f2491
commit
dfcca3385e
|
@ -42,15 +42,11 @@ class CoreMenu {
|
||||||
* Add registered admin settings as menu items.
|
* Add registered admin settings as menu items.
|
||||||
*/
|
*/
|
||||||
public static function get_setting_items() {
|
public static function get_setting_items() {
|
||||||
$setting_pages = \WC_Admin_Settings::get_settings_pages();
|
$tabs = apply_filters( 'woocommerce_settings_tabs_array', array() );
|
||||||
$settings = array();
|
|
||||||
foreach ( $setting_pages as $setting_page ) {
|
|
||||||
$settings = $setting_page->add_settings_page( $settings );
|
|
||||||
}
|
|
||||||
|
|
||||||
$menu_items = array();
|
$menu_items = array();
|
||||||
$order = 0;
|
$order = 0;
|
||||||
foreach ( $settings as $key => $setting ) {
|
foreach ( $tabs as $key => $setting ) {
|
||||||
$order += 10;
|
$order += 10;
|
||||||
$menu_items[] = (
|
$menu_items[] = (
|
||||||
array(
|
array(
|
||||||
|
|
Loading…
Reference in New Issue