Card-Only Product Payment Restriction WordPress Function
What it does?
-
Per-product switch: Adds a simple checkbox on product edit screens (works for simple & variable products).
-
Cart-aware filter: If the cart contains at least one flagged item, removes Cash on Delivery from available payment methods.
-
Lightweight & automatic: No extra setup at checkout—just tick the box on the products that must avoid COD.
Why it’s useful?
-
Reduces risk & returns: Useful for high-value, customized, or pre-order items where COD is unreliable.
-
Fine-grained control: Decide payment rules at the product level instead of applying blanket restrictions.
-
Cleaner checkout: Prevents customers from choosing unavailable or risky options, lowering support friction.
