I setup a invoice payment for a client here in Norway,
as she wanted business to be able to pay within two weeks of having received her book.
I did some research and ended up with the following solutions.
Part 1: The plugins.
wordpress.org/plugins/woocommerce-pdf-invoices/
WooCommerce PDF Invoices adds a way to include/attach an invoice to a customer e-mail. After installing the plugin it shows up under WooCommerce -> Invoices. There are two tabs. General which shows various options. In the screenshot I have selected to attach the invoice pdf to the completed order.
The Template tab gives various options for the text information included in the Invoice PDF file as well as other options.
Another plugin I decided to install is wordpress.org/plugins/woocommerce-sequential-order-numbers/
Sequental Order Numbers automatically adds an order number to each order. The options are added directly to WooCommerce -> Invoices -> Template tab.
Part 2: Setting up Payments
To setup the Invoice payment I went to WooCommerce -> Settings -> Payments.
Adjust the prexisting Cash on delivery option. I adjusted the title and description. Then activate it. Test it out on the frontend with a product selected. Here is the setup I added.
When a client uses the Invoice option to pay they will now get a pdf of the invoice when the order has been set as completed.
To set an order as completed go to WooCommerce -> Orders. Select the order. Then in the Status drop down adjust the order to completed.
A code tip. If you need to set the order as completed automatically you can use something like the following code:
// From Kathy - Helga the Viking. https://gist.github.com/paaljoachim/643ed78229ab0b0d9d0ad5dfeec80240 add_filter( 'woocommerce_payment_complete_order_status', 'kia_order_payment_complete_order_status', 10, 2 ); function kia_order_payment_complete_order_status( $order_status, $order_id ) { $order = wc_get_order( $order_id ); if ( 'processing' == $order_status && ( 'pending' == $order->status ) ) { $order_status = 'completed'; } return $order_status; }
Additional plugins to also take a closer look at:
wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/
wordpress.org/plugins/print-invoices-packing-slip-labels-for-woocommerce/
Thank you very much for this tutorial. I will refer to it now!