Skip to content
Advertisement

In woocommerce show the check payment option when an order total is 0 dollars

On my wordpress, woocommerce website I am trying to add something to the function.php of my theme that will enable the pay with check option if the order total is 0 dollars.

what I have so far:

JavaScript

Obviously set isn’t correct, but I am not sure what to use in place of it.

Advertisement

Answer

Since the total order is 0 there is no need of payment so woocommerce have woocommerce_cart_needs_payment which will give false when total is 0 so no payment methods are required.

Just fyi cheque is the name of the gateway not check

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement