Conditional payment methods
-
I want to have conditional payment gateway based on the cart total amount.
eg: for amount > 10 , use cc and local gateways (eg fpx, grabpay etc)
else use CC only.I have tried your hooks,
wc_stripe_available_payment_gateways
add_filter('wc_stripe_available_payment_gateways', 'remove_mobile_pay', 99999); function remove_mobile_pay($gateways){ $total = WC()->cart->total; }
But the
$total
give me 0 values. I have triedWC()->cart->get_cart_subtotal()
,WC()->cart->cart_contents_total
,WC()->cart->subtotal
, All these hooks giving zero (0) amount.What did i done wrong?
Or any other methods to have conditional gateways?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Conditional payment methods’ is closed to new replies.