Created
February 16, 2023 12:49
-
-
Save sarancartrabbit/6fac6724b73feda5df57762f09fb11b8 to your computer and use it in GitHub Desktop.
Discount rules v2: To show discount rule name in admin panel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('admin_menu', function () { | |
if (!is_admin()) return; | |
if(class_exists('\Wdr\App\Router')){ | |
$admin = \Wdr\App\Router::$admin; | |
global $submenu; | |
add_submenu_page( | |
'woocommerce', | |
__('Woo Discount Rules', 'woo-discount-rules'), | |
__('Woo Discount Rules', 'woo-discount-rules'), | |
'manage_woocommerce', WDR_SLUG, | |
array($admin, 'adminTabs') | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment