• Hi everyone,

    I have an issue with the menus. When I go to Aspect -> Menus, the menu items do not show up (500 – Internal server error). Enabling WP_DEBUG doesn’t show up anything too, but this is a screenshot of the console log: https://i.imgur.com/3KS5apS.png

    I tried to replace wp-admin and wp-includes folders with a fresh WP installation.

    This problems persists even if I activate the default theme. I also tried to disable every plugin, with everything disabled the problem appears only when I enable Woocommerce back. I use the latest version of it. Do you have any idea of what could cause this? Tell me if you need more infos and thank you very much in advance for all the great work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    To clarify, this issue still happens when you switch to a default WordPress theme, and at the same time, disable all plugins except for WooCommerce?

    You say this issue happens at ‘Aspect -> Menus’, which is apart of your theme, correct?

    Thread Starter Eff3

    (@eff3)

    You say this issue happens at ‘Aspect -> Menus’, which is apart of your theme, correct?

    Sorry I meant Appearance -> Menus the WordPress default menus options.

    I found out the problem after some further testing.

    It was in a function I wrote in the functions.php, I used it to remove the COD payment method in certain conditions. Here’s the code:

    add_filter( 'woocommerce_available_payment_gateways', 'filter_gateways', 1);
    function filter_gateways( $gateways ){
            global $woocommerce;
    
    	$amount = $woocommerce->cart->total;
    
    	if($amount > 0)
    	{
                 // My Code ...
    	}
            
            return $gateways;
    
    }

    I didn’t check for the $amount to be greater than 0 before my code. Sure it is some stupid error, but I still can’t find out why it only happened in the menus section and why everything was working properly without errors, checkout included ??

    If you have anything else to add that could help me understand this please feel free to respond, or I will just mark it as resolved. Thanks a lot for your time.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Menus not showing up’ is closed to new replies.