
Filters – these let you modify the behavior of something that already exists (a variable).For example, inserting your Google Analytics tracking script into the header of your site like I mentioned above. Action – these let you do “something” new.Rather than using a Google Analytics plugin or manually editing the header template of your child theme, you could just use the aforementioned wp_head hook to easily insert the Google Analytics tracking script at the right location. Let’s say that you want to add the Google Analytics tracking script to your site.
HOOK AND REAL HOW TO


In this post, we’re going to cover everything hook-related. What’s so great about WooCommerce hooks is that they let you do this without needing to edit any of the underlying theme template files. Hooks make it easy to insert content or change behavior at specific parts on your store, like the checkout page, shopping cart page, etc. We’ve included two videos at the end which allow you to follow along step-by-step. If you want to customize how your WooCommerce store looks and/or functions, understanding WooCommerce hooks is going to make your life a whole lot easier.
