How to edit “Processing” orders?

WooCommerce has different order statuses that you can use to handle your workflow.
They are:

  • On Hold – The order is waiting for something, like a BACS payment.
  • Pending Payment – The order is waiting for the payment from an online payment gateway.
  • Processing – The order has been paid for and the admin is processing it.
  • Completed – The order has been shipped and completed.
  • Cancelled – The order has been cancelled by the customer or by the system for some reason.
  • Refunded – The order has been completely refunded. This is not used for partial refunds.
  • Failed – The order payment failed.

You can edit orders only when their status is On hold or Pending Payment. This is because the customer still needs to pay for that order, so it makes sense to accept changes for it.
Nobody would be happy to see their total amout changed after they paid.

But for any reason, you may need to allow Processing orders (in example) to be editable. How to do this?

Continue reading How to edit “Processing” orders?

Change the order date format in Order CSV Export

Do you need to export your orders into a CSV? Maybe even automatically?
Well, WooCommerce Order/Customer CSV Export is what you need.

The plugin documentation already has an extensive developers documentation which teach you how to change the file name, reorder columns, adding columns, and much more.

Here instead is an additional snippet to change the date format.
By default the plugin exports the date in the format Y-m-d H:i:s. What if you want to change it?

Continue reading Change the order date format in Order CSV Export

Change the fields order in Bookings form

WooCommerce Bookings has a form which allows your customers to choose the duration of their booking, the number of persons to book, the date and resources.
All the fields are shown in a specific order by default, which is

  1. Duration (if not fixed)
  2. Number of persons
  3. Resources (if not automatically assigned)
  4. Calendar

Do you need to change this order? Great, here is a snippet for you then.

Continue reading Change the fields order in Bookings form

Change the WooCommerce Order/Customer CSV Export capability

By default the plugin WooCommerce Order/Customer CSV Export is available to use for anyone who can manage the shop. This means that all the administrators and shop managers will be able to use it.

But you might need to change this. For example, you might need to exclude the shop managers, and only allow administrators to do this.

Is it possible? Obviously yes!

Continue reading Change the WooCommerce Order/Customer CSV Export capability

Add the quantity field to the [add_to_cart] shortcode

With WooCommerce you have some shortcodes available to use anywhere in your site.

One of them is the shortcode [add_to_cart] which allows to print the Add to Cart button for a specific product on your site.

It only shows the button though, you can’t choose the quantity of that product without going to the cart page before.
You can include the quantity field tweaking the default template.

Let’s see how.

Continue reading Add the quantity field to the [add_to_cart] shortcode

Display the customer’s username in the Bookings list

If you are using WooCommerce Bookings, sometimes it could be hard to understand what customer booked for a product on your site.
It could be the case when you have multiple customers with the same name.

An easy way to avoid confusion is to print the username of the customer. WordPress only allows for unique usernames, so there will be no mistakes using it instead of the real customer name.

Continue reading Display the customer’s username in the Bookings list