woothemes/woocommerce — pull request #5337 by ragulka (2014-04-18 09:59:08+00:00)
Title: Add option to enable/disable Payments

**Motivation**
I've built a few stores now that require this. What this basically means is that some businesses do not intend to collect any payments online. They use the store to simply accept orders.

The whole payment process is handled outside of the shop. Because of that - they do not require any kind of payment gateways, or anything related to payments in the shop, for that matter. They do not event want to present any kind of payment options to the customer, as these may be confusing (example - customer will actually pay in cash when picking up the order).

**Proposal**
Perhaps we could add an "Accept Payments" or "Enable Payments" checkbox to Checkout settings, very much like the "Enable taxes and tax calculations" and "Enable shipping" checkboxes/settings.

Disabling payments would then mean that once a customer goes to checkout, no payment options are presented to her, and she can simply place the order. Placing the order would then reduce stock and set the order status to processing or on-hold (depending on the requirements of the specific store - perhaps make it an option or at least filterable). No payment method data would be set on the order.

Further processing of the order will then take place outside of the WooCommerce store, perhaps simply manually sending an invoice, or perhaps there are contracts with the customer that allow her to order without paying in advance - this is really outside the scope of WooCommerce and up to the store owner.

**Implementation**
Obviously, we'd need to add a checkbox to the Checkout settings and store this value. Then, once a customer reaches checkout, we'd need to check if payments are enabled and if not, then simply not display any payment options. This could even be done by filtering the value of `$cart->needs_payment`.

If `needs_payment` is false, then WooCommerce will simply call `$order->payment_complete()`. This in turn will set the order status to either `processing` or `completed` - based on whether WC thinks it needs processing or not. The status being set can also be filtered via `woocommerce_payment_complete_order_status`, which should help if store owner wants to leave the orders to `on-hold`.