• Your plugin is calling the add_submenu_page() incorrectly. By adding the ‘dashicons-location’ string in the seventh parameter, which should be an integer: int $position = null. Also, if you’re going to place the submenu so far below, you can leave this parameter out, since when null, it will be placed at the end of the menu anyways.

    By default, submenu pages don’t have dashicons, and you shouldn’t include the parameter.

    For the complete notice:

    Notice	add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)	1	-
    wp-includes/functions.php:4986
    Rollbar\H\ErrorHandler->handle()
    wp-includes/functions.php:4986
    add_submenu_page()
    wp-content/plugins/checkout-address-sugessions-for-woocommerce/lib/class.cas.woocommerce.php:71
    cas_woocommerce->cas_rkc_show_menu()
    wp-includes/class-wp-hook.php:288
    do_action('admin_menu')
    wp-admin/includes/menu.php:155

    For the correct implementation see: https://developer.www.ads-software.com/reference/functions/add_submenu_page/

    Best regards

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Notice: add_submenu_page() was called Incorrectly’ is closed to new replies.