Automattic\WooCommerce\Admin\Features\Navigation
CoreMenu::get_categories()
Get all menu categories.
Метод класса: CoreMenu{}
Хуков нет.
Возвращает
Массив
.
Использование
$result = CoreMenu::get_categories();
Код CoreMenu::get_categories() CoreMenu::get categories WC 8.7.0
public static function get_categories() { $analytics_enabled = Features::is_enabled( 'analytics' ); return array( array( 'title' => __( 'Orders', 'woocommerce' ), 'id' => 'woocommerce-orders', 'badge' => self::get_shop_order_count(), 'order' => 10, ), array( 'title' => __( 'Products', 'woocommerce' ), 'id' => 'woocommerce-products', 'order' => 20, ), $analytics_enabled ? array( 'title' => __( 'Analytics', 'woocommerce' ), 'id' => 'woocommerce-analytics', 'order' => 30, ) : null, $analytics_enabled ? array( 'title' => __( 'Reports', 'woocommerce' ), 'id' => 'woocommerce-reports', 'parent' => 'woocommerce-analytics', 'order' => 200, ) : null, array( 'title' => __( 'Marketing', 'woocommerce' ), 'id' => 'woocommerce-marketing', 'order' => 40, ), array( 'title' => __( 'Settings', 'woocommerce' ), 'id' => 'woocommerce-settings', 'menuId' => 'secondary', 'order' => 20, 'url' => 'admin.php?page=wc-settings', ), array( 'title' => __( 'Tools', 'woocommerce' ), 'id' => 'woocommerce-tools', 'menuId' => 'secondary', 'order' => 30, ), ); }