Conditional payment gateway
-
Hi
any idea why this code is not working ? I need to hide payment gateway based on below condition”
My checkout page url: https://xyz.co.uk/checkout/?action=reservedadd_filter( 'woocommerce_available_payment_gateways', 'hide_paypal_enable_manager' ); function hide_paypal_enable_manager( $available_gateways ) { global $woocommerce; if ( $_GET['action'] == 'reserved' ) { unset( $available_gateways['paypal'] ); } return $available_gateways; }
Thanks
LR
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Conditional payment gateway’ is closed to new replies.