• Resolved loopforever

    (@loopforever)


    Hi, I’m trying to add submenu to Dokan in my plugin. However, I couldn’t add it. Where am I doing wrong? Can you help me ?

    class Admin { 
        public function __construct() { 
            //add_action( 'dokan_admin_menu', array( $this, 'refund_info_template' ) );
            add_action( 'admin_menu', array( $this, 'refund_info_template' ) );
            
        }
    
        public function customer_relationship() {
            add_submenu_page( 'dokan', __( 'Customer Relationship ', 'cr' ), __( 'Customer Relationship', 'cr' ), 'manage_options', 'customer-relationship', array( $this, 'customer_relationship_menu_context' ), 5);
        }
        public function customer_relationship_menu_context() {
            echo 'defined';
        }
    }
Viewing 1 replies (of 1 total)
  • Thread Starter loopforever

    (@loopforever)

    Hello ,
    I solved the problem but there is something else. Even though I changed the priority order (99), the menu remains constant.
    What can I do ?
    add_submenu_page( 'dokan', __( 'Customer Relationship ', 'cr' ), __( 'Customer Relationship', 'cr' ), 'manage_options', 'customer-relationship', array( $this, 'customer_relationship_menu_context' ), 99);

    Not: For adding i used dokan_admin_menu hook.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding a Dokan Submenu’ is closed to new replies.