Order Form for WooCommerce version 1.4.0 has just been released. Submitting a form can now return back to the form, and there are new action hooks for customisers.
By default, the order form sends the customer directly to the checkout. There is a shortcode attribute for sending the customer to the shopping cart instead, for a compact review of what was ordered: submitredirect="cart"
. Now you can return the customer to the order form instead: submitredirect="form"
.
For customisers, there are some new hooks that let you add content to the order form without needing to maintain a customised copy of the order form templates. You can still create custom templates, of course, but it’s often easier to maintain customisations using action hooks. You can find the action hooks in the templates themselves — I promise to add some documentation to the Order Form for WooCommerce website soon too!
For example, you can insert a new column before the Price column using these action hooks, each of which receives the Product object and the shortcode attributes array:
- orderform_woocommerce_before_order_price_head
- orderform_woocommerce_before_order_price_foot
- orderform_woocommerce_before_order_price
You can update to version 1.4.0 from your WordPress plugin admin page.