Developers can insert their own content into the order form without the need to customise templates, by hooking the available action hooks. There are many useful action hooks supported by the default templates, the plugin core, and WooCommerce itself.
Here’s some example code that uses these action hooks:
- add product attributes under product title
- add product SKU under product title
- insert a product SKU column before the product title column
- add a submit button to the top of the order form
orderform_
woocommerce_ before_ order_ grid_ qty - array $attrs — the shortcode attributes for the order form
Fires before the item count in the order summary for grid templates.
orderform_
woocommerce_ before_ order_ grid_ subtotal - array $attrs — the shortcode attributes for the order form
Fires before the form subtotal for grid templates.
orderform_
woocommerce_ before_ order_ image - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires inside the product item row, before the product image column.
orderform_
woocommerce_ before_ order_ image_ foot - array $attrs — the shortcode attributes for the order form
Fires inside the order form footer, before the product image column.
orderform_
woocommerce_ before_ order_ image_ head - array $attrs — the shortcode attributes for the order form
Fires inside the order form header, before the product image column.
orderform_
woocommerce_ before_ order_ item - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires inside the product item row, before the product title column.
orderform_
woocommerce_ before_ order_ item_ foot - array $attrs — the shortcode attributes for the order form
Fires inside the order form footer, before the product title column.
orderform_
woocommerce_ before_ order_ item_ head - array $attrs — the shortcode attributes for the order form
Fires inside the order form header, before the product title column.
orderform_
woocommerce_ before_ order_ price - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires inside the product item row, before the price column.
orderform_
woocommerce_ before_ order_ price_ foot - array $attrs — the shortcode attributes for the order form
Fires inside the order form footer, before the price column.
orderform_
woocommerce_ before_ order_ price_ head - array $attrs — the shortcode attributes for the order form
Fires inside the order form header, before the price column.
orderform_
woocommerce_ before_ order_ qty - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires inside the product item row, before the quantity column.
orderform_
woocommerce_ before_ order_ qty_ foot - array $attrs — the shortcode attributes for the order form
Fires inside the order form footer, before the quantity column.
orderform_
woocommerce_ before_ order_ qty_ head - array $attrs — the shortcode attributes for the order form
Fires inside the order form header, before the quantity column.
orderform_
woocommerce_ before_ order_ rowtotal - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires inside the product item row, before the row total column.
orderform_
woocommerce_ before_ order_ rowtotal_ foot - array $attrs — the shortcode attributes for the order form
Fires inside the order form footer, before the row total column.
orderform_
woocommerce_ before_ order_ rowtotal_ head - array $attrs — the shortcode attributes for the order form
Fires inside the order form header, before the row total column.
orderform_
woocommerce_ form_ after - array $attrs — the shortcode attributes for the order form
Fires inside the order form wrapper div, after the form element.
orderform_
woocommerce_ form_ before - array $attrs — the shortcode attributes for the order form
Fires inside the order form wrapper div, before the form element.
orderform_
woocommerce_ form_ end - array $attrs — the shortcode attributes for the order form
Fires inside the form element, after the form content.
orderform_
woocommerce_ form_ start - array $attrs — the shortcode attributes for the order form
Fires inside the form element, before the form content.
orderform_
woocommerce_ item_ card_ after - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires after each product card / row in a grid template.
orderform_
woocommerce_ item_ card_ before - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires before each product card / row in a grid template.
orderform_
woocommerce_ item_ row_ after - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires after a product row in the order form.
orderform_
woocommerce_ item_ row_ before - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires before a product row in the order form.
orderform_
woocommerce_ order_ item_ end - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires inside the product item column, after the product title and link.
orderform_
woocommerce_ order_ item_ start - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires inside the product item column, before the product title and link.
orderform_
woocommerce_ product_ end - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires inside the product container, after other elements are rendered.
orderform_
woocommerce_ product_ start - WC_Product $product — the WooCommerce product
- array $attrs — the shortcode attributes for the order form
Fires inside the product container, before other elements are rendered.