• Resolved brzeda

    (@brzeda)


    Hi! I don’t see any option to disable Apple Pay in payment methods when choosing Cash on Delivery Shipping method in checkout. When clients chooses DHL Cash on Delivery, then payment options should display only cash on delivery. Please guide me somehow, cause in Woocommerce options there is no way to disable that or hide with css on checkout.

Viewing 1 replies (of 1 total)
  • Plugin Author Clayton R

    (@mrclayton)

    Hi @brzeda,

    I don’t see any option to disable Apple Pay in payment methods when choosing Cash on Delivery Shipping method in checkout.

    That’s a very specific requirement so there isn’t a setting in the plugin for something like that.

    If you want to disable a particular payment method based on conditional logic, you could use the woocommerce_available_payment_gateways filter.

    Example:

    add_filter('woocommerce_available_payment_gateways', function($payment_gateways){
        if(is_checkout()){
            // your shipping logic here
            unset($payment_gateways['stripe_applepay']);
        }
        return $payment_gateways;
    });
    • This reply was modified 4 years, 6 months ago by Clayton R.
Viewing 1 replies (of 1 total)

The topic ‘Disable Apple Pay in payment options’ is closed to new replies.