Support » Plugin: Admin Page Framework » Cannot create a sub-menu under woocommerce

  • Resolved wpgetty


    I was trying to add a sub menu under the root menu ‘WooCommerce’. I set the root menu as followings,
    $this->setRootMenuPageBySlug( ‘edit.php?post_type=shop_order’ );

    then add the sub menu,
    ‘title’ => ‘My Title’, // the page and menu title
    ‘page_slug’ => ‘my_slug’ // the page slug

    However it’s not working. I just cannot see ‘My Title’ under WooCommerce.

    PS. It can be working if I put it under WooCommerce’s ‘Product’ menu if I set the root to be,
    $this->setRootMenuPageBySlug( ‘edit.php?post_type=product’ );

    Kindly advise. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author miunosoft



    It seems they use the page slug, woocommerce for the root menu page named WooCommerce. This should work.

    $this->setRootMenuPageBySlug( 'woocommerce' ); // giving the page slug

    It really works by following your advice. Appreciated very much.

    Plugin Author miunosoft


    Glad it helped!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.