How you can disable/cover all fee gateways in WooCommerce

Introduction

WooCommerce is an eCommerce WordPress plugin used to arrange a web based store in your WordPress web site. WooCommerce could be very versatile and user-friendly as you may simply customise its performance utilizing its hooks and its templates by overriding choices in your theme.

Why disable all fee gateways in WooCommerce?

If in case you have long-term clients who place an order on common foundation like weekly and pay later on the finish of the week, fortnight, or perhaps a month. Generally you need to schedule an order supply on completely different dates. The place the gross sales division manages all of the invoices and supply schedules, and this could undoubtedly make issues simpler for the shoppers to put an order.

Just lately we created a web based retailer for one among our purchasers who scheduled orders supply on chosen days that’s managed within the backend system. So, when the shoppers visited the shop, they positioned orders with out doing on-line funds.

Woocommerce hook to disable fee gateways

If you wish to arrange a Woo retailer for items supply the place the store proprietor needs to take orders manually and ship later by sending an bill to the shopper; in different phrases, he doesn’t want on-line fee performance. It’s essential disable or cover fee gateways.

Right here is the code snippet written beneath that you could copy after which paste into your theme’s capabilities.php file.

// Disable all fee gateways on the checkout web page
add_filter( 'woocommerce_cart_needs_payment', '__return_false' );

After inserting this snippet all fee gateways might be disabled and clients will be capable of place orders and go to the thankyou web page on to see order particulars.

We’re WordPress WooCommerce specialists. We did lots of work in WooCommerce like WooCommerce-ready theme design, Store setup, customization, and plugin improvement. You possibly can talk about your Woocommerce necessities with us.