Is it possible to add a new admin menu to the woocommerce admin section in Wordpress? I've done this with WP E-commerce with my custom plugin so am wandering if the same is true for Woo commerce.
Thanks
Well, if you use something like this:
add_action('admin_menu', 'register_my_custom_submenu_page');
function register_my_custom_submenu_page() {
add_submenu_page( 'woocommerce', 'My Custom Submenu Page', 'My Custom Submenu Page', 'manage_options', 'my-custom-submenu-page', 'my_custom_submenu_page_callback' );
}
function my_custom_submenu_page_callback() {
echo '<h3>My Custom Submenu Page</h3>';
}
Then you will see a submenu under "Woocommerce" admin menu. For some reason you can´t do same using post_type=shop_order.
"shop_order" is the one you should use to put a submenu under "Woocommerce" one.. but, as i said, don´t know why didn´t work with that particual post_type.
http://codex.wordpress.org/Function_Reference/add_submenu_page
For me the following worked:
add_submenu_page(
'edit.php?post_type=product',
PAGE_TITLE,
MENU_TITLE,
'manage_woocommerce',
'custom_wc_menu'
);
Setting the $parent_slug to edit.php?post_type=product
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With