- Inserts a custom message if the user selects that payment method
- Actually disables WooCommerce from using a specific payment method (no user HTML workarounds)
- Prevents the
Place order
button from being clicked for that payment method, allows other methods to proceed - Skips over the payment method automatically when the checkout page loads
- Add the PHP code into your theme's
functions.php
file or by using a plugin like Theme Customisations. - Change the
DISABLE_GATEWAY_ID
to the ID of whichever payment gateway you want to disable. - Change the
DISABLE_MESSAGE
to whatever message you want to appear on the disabled payment gateway. - Optionally use the CSS in
style.css
to adjust the margins of the alert box