Available Payment gateway not showing

[ad_1]

Hello,
In the site im building i was trying disable/enable payment if the user country is us or canda

WC()->payment_gateways->get_available_payment_gateways();

i looked for example at:

$gateways = WC()->payment_gateways->get_available_payment_gateways();
$gateways['cod']->enable="no"

this resulted for some reason to remove all available payment gateways. and know even if from the Payment>Settings after i enable different methods they are not working. is there a way to reset the payemnts getways? ive tried to update the woocomerce plugin, worpdress but nothing helps.

thanks

  • This topic was modified 2 hours, 28 minutes ago by maxiwp.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer