I was wondering if there's a way to add a menu item to access my plugin settings on the Woocommerce menu dashboard.

enter image description here

I've tried using the admin_menu hook, but no success at all.

Thank you everyone!


try this code. Paste in to function.php

add_action('admin_menu', 'custom_page');
function custom_page() {
    add_submenu_page( 'woocommerce', 'Name of page', 'Name of item', 'manage_options', 'custom-slug', 'custom_page_content' ); 
function custom_page_content() {
    echo 'Page content';

enter image description here

  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Nov 23 '21 at 22:23
  • Unfortunately this doesn't work. The menu option is not appearing under the WooCommerce menu Nov 29 '21 at 17:19
  • @EduardoChaparroAlire Yes, i tested it and work it. Down is screen Nov 29 '21 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.