Fatal Error with woocommerce_account_menu_items hook
-
I had this issue with another plugin and they updated their plugin with this fix:
Added a sanity check to the woocommerce_account_menu_items hook in case other plugins have altered the parameter type of this WooCommerce hook.
Is it possible that you could do the same?
Issue:
An error of type E_ERROR was caused in line 1047 of the file /home2/ganocclb/public_html/wp-content/plugins/user-switching/user-switching.php. Error message: Uncaught TypeError: Argument 1 passed to user_switching::filter_woocommerce_account_menu_items() must be of the type array, null given, called in /home2/ganocclb/public_html/wp-includes/class-wp-hook.php on line 326 and defined in /home2/ganocclb/public_html/wp-content/plugins/user-switching/user-switching.php:1047
Stack trace:
#0 /home2/ganocclb/public_html/wp-includes/class-wp-hook.php(326): user_switching->filter_woocommerce_account_menu_items(NULL)
#1 /home2/ganocclb/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(NULL, Array)
#2 /home2/ganocclb/public_html/wp-content/plugins/customize-my-account-page-for-woocommerce/includes/AccountMenu.php(133): apply_filters(‘woocommerce_acc…’, Array, Array)
#3 /home2/ganocclb/public_html/wp-includes/class-wp-hook.php(324): ThemeGrill\WoocommerceCustomizer\AccountMenu->init_default_endpoints(”)
#4 /home2/ganocclb/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#5 /home2/ganocclb/public_html/wp-includes/plugin.php(5
- The topic ‘Fatal Error with woocommerce_account_menu_items hook’ is closed to new replies.