Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying WooCommerce Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
WooCommerce Cookbook

WooCommerce Cookbook

By : Rauland
3.4 (12)
close
close
WooCommerce Cookbook

WooCommerce Cookbook

3.4 (12)
By: Rauland

Overview of this book

If you have ever built or managed a WordPress site and want to add e-commerce functionality into your site, WooCommerce and this book are perfect for you. Learning how to use WooCommerce through this series of recipes will give you a solid platform to add any future e-commerce needs.
Table of Contents (12 chapters)
close
close
11
Index

Using WooCommerce hooks

The ability to override WooCommerce templates is available to alter HTML and CSS. It isn't terribly great when adding extra logic with PHP or rearranging different templates. Many of the templates are hooked in. What this means is that there is a placeholder in the template that will usually look similar to the following code:

/** * woocommerce_single_product_summary hook * * @hooked woocommerce_template_single_title - 5 * @hooked woocommerce_template_single_rating - 10 * @hooked woocommerce_template_single_price - 10 * @hooked woocommerce_template_single_excerpt - 20 * @hooked woocommerce_template_single_add_to_cart - 30 * @hooked woocommerce_template_single_meta - 40 * @hooked woocommerce_template_single_sharing - 50 */ do_action( 'woocommerce_single_product_summary' );

From the comments in the code, you can see where the developers have programmed certain pieces of functionality. However, they're not easy to move unless you know how to use WordPress...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete