Programmatically change Payment Methods WooCommerce

Theres a filter called woocommerce_available_payment_gateways:

add_filter('woocommerce_available_payment_gateways','filter_gateways',1);
function filter_gateways($gateways){
    global $woocommerce;        
    //Remove a specific payment option
    unset($gateways['paypal']);
    return $gateways;
}

I’m not sure where and how you get / store the Request for Quote option, but you can access the value inside the filter_gateways function and you can remove a specific gateway with a conditional logic.

Leave a Comment