Skip to content
Advertisement

Disable specific payment methods for specific shipping zones when cart subtotal reach a specific amount in Woocommerce

In Woocommerce, I’m trying to remove “Cash on delivery” payment method when cart subtotal is up to $250 for specific shipping zones names (Zone 1, Zone 4 and Zone 7).

All others zones must not have this restriction.

Here is my incomplete code based on this thread:

JavaScript

Any help is appreciated.

Advertisement

Answer

The following will remove “Cash on delivery” payment gateway for specific shipping zones and when cart subtotal is up to 250:

JavaScript

Code goes in functions.php file of your active child theme (or active theme). Tested and works.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement