From the course: WordPress: Customizing WooCommerce Themes

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Use WooCommerce hooks

Use WooCommerce hooks - WordPress Tutorial

From the course: WordPress: Customizing WooCommerce Themes

Start my 1-month free trial

Use WooCommerce hooks

- [Instructor] If you're planning on rearranging the product page, you'll likely want to use WooCommerce hooks. WooCommerce uses many of its own actions to arrange items on the page. If you take a look at woocommerce, templates, and then content-single-product.php, you'll see an action called woocommerce_single_product_summary, and above in the comments you'll see where all of the items in that page are being hooked in. So how do you use this? How does this help? You can see what items are hooked in and where you can unhook them and then rehook them. You can move the rating beneath the price, or you can move the excerpt above the title. Let's say you receive phone orders but only 1% of your orders come in via the phone. Then you might not need that SKU field to be prominent and you might want to move it somewhere where it's not in the way. The SKU field is included within woocommerce_template_single_meta. In our themes functions.php we can hide it entirely with a WordPress function…

Contents