Remove payment options from woocommerce

I had a client asking if it is possible disable all payment gateways in woocommerce checkout. The customer will be able to place orders without payment. He will send them an invoice manually.

But in woocommerce you must have at least one payment gateway. So, here is the solution:

  1. Open your theme’s functions.php file
  2. Add the following code
 add_filter('woocommerce_cart_needs_payment', '__return_false');

It will remove all payment method from woocommerce. You can customize this disable payment method for certain products or specific country.

If you have any questions or issues to implement the code, feel free to comment below

Leave a Reply

Your email address will not be published. Required fields are marked *