Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    Thread Starter Eff3

    (@eff3)

    Thank you for the answer, since we have a lot of plugins I wanted to make sure it was not a known core error. By the way it turned out it was the “reCAPTCHA” plugin, so disabling it solved the problem.

    Thanks again,
    Best regards

Viewing 2 replies - 1 through 2 (of 2 total)