WooCommerce: Manually create orders

The problem

I’m the manager of an e-commerce based on WooCommerce and sometimes I need to manually create orders for my clients.
I also wish that my client receives an email with the link to pay that order.

Pre-requisites

– WooCommerce, preferably updated to one of the latest versions.

The solution

  • Create a WordPress user, specifying the role “Customer” and save.
  • Change the newly created user, because in the meantime, Billing fields – added by WooCommerce – will be appeared. Complete these fields, and in particular the e-mail address (without which no e-mails will be sent).
  • Create a product, if not present.
  • Create an order:
    • Associate the user to the order
    • Load Billing Details
    • Add the product (or products)
    • Be sure that the status of the order is “pending”
    • Calculate totals using the appropriate button (without this, the total would be zero and the payment gateways would not appear on the payment page)
    • Save
  • From the menu “Actions” select “Customer Invoice” and click on the button to the side: this will send the email to the customer.
  • In order to use Disqus to comment out you have to accept the use of third-party cookies.