• Notice: add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position.

    On line 158 remove the seventh parameter

    Reason: add_submenu_page does not take icon as any parameter

    public function WMAMC_add_menulink() {
    
         $this->adminpage = add_submenu_page(
                    'woocommerce',
                    __('Add Cart Limit','wmamc-cart-limit'),
                    __('Add Cart Limit','wmamc-cart-limit'), 
                    'manage_woocommerce',
                    'wmamc_cart_limit',
                    array($this, 'WMAMC_render_submenu_pages' ),
                    // 'dashicons-format-video' // <<< remove or comment this line
                );
    }
  • The topic ‘Fix for add_submenu_page notice’ is closed to new replies.