How to Disable All Payment Gateways in WooCommerce

So you have a WooCommerce shop but you don’t want to take payments? That’s neat! Please remind me to place an order on your site after your read that post then!

In all seriousness, many WooCommerce shop owners have a shop where payments aren’t required at all. Customers place orders and payments are not handled by WooCommerce, or not handled at all. And there’s a super easy way to disable all payment gateways at once, no need for a plugin, no need to pull your hair. The solution is just one single line of code to add to the file called functions.php, within your theme folder, or using a plugin like Code Snippets.

<?php // Do not include this if already open! Code goes in theme functions.php.

// Disable all payment gateways on
// the checkout page and replace the
// "Pay" button by "Place order"
add_filter(
	'woocommerce_cart_needs_payment',
	'__return_false'
);

And boom, the checkout page now displays a lovely “Place Order” button, no more payment gateways… That’s a Christmas miracle!