• Resolved wpgetty

    (@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,
    $this->addSubMenuItems(
    array(
    ‘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)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot create a sub-menu under woocommerce’ is closed to new replies.