Gateway Code
-
Hi there,
Please, I need some help with this…I′m trying to disable payment gateway for a specific shipping method, in this case I have disable PayPal and I need to do so for Paycomet.. but I cannot find the GatewayCode payment for Paycomet, I need to use here:add_filter( ‘woocommerce_available_payment_gateways’, ‘x34fg_gateway_disable_shipping’ );
function x34fg_gateway_disable_shipping( $available_gateways ) {
global $woocommerce;
if ( !is_admin() ) {
$chosen_methods = WC()->session->get( ‘chosen_shipping_methods’ );
$chosen_shipping = $chosen_methods[0];
if ( isset( $available_gateways[‘cod’] ) && 0 === strpos( $chosen_shipping, ‘local_pickup’ ) ) {
unset( $available_gateways[‘cod’] );
}}
return $available_gateways;
}
The page I need help with: [log in to see the link]
- The topic ‘Gateway Code’ is closed to new replies.