My Courses > CustomizeWoo > Module 4 > Lesson 02: How to Find Hooks (Free)

How to Find Hooks (Free)

MARK LESSON AS COMPLETE

The WooCommerce visual hook guide series comes to the rescue – otherwise do a file search for “do_action” πŸ™‚

Video

Please note: English captions are enabled by default (click on “CC” in the video player to disable). Also, you can click on the “gear” icon to manage quality and playback speed. Enjoy!

Sorry, this video is visible to logged in and fully registered students only.
If you already enrolled in this course, please LOG IN
Otherwise, please enroll in the FREE / PRO COURSE
For any other queries, feel free to get in touch

Useful Links

Visual Hook Guides: https://businessbloomer.com/category/woocommerce-tips/visual-hook-series/

12 thoughts on “How to Find Hooks (Free)

  1. Hi Rodolfo,

    Is there any hooks in Woocommerce Thank You Page?

    Thanks,
    Frank.

    1. Hi Frank. Yes, definitely, there are 3 of them:

      do_action( 'woocommerce_before_thankyou', $order->get_id() );
      do_action( 'woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id() );
      do_action( 'woocommerce_thankyou', $order->get_id() );
      
      1. Thank you somuch, Am stil learning.

        1. You’re very welcome. And contacting me is surely a great way to learn!

  2. …for me the easiest way to find hooks is the plugin “simply show hooks”. With that plugin all hooks are displayed on the page and one can see, what functions that are hooked on each hook and with which priority. Makes it really easy!
    Greetings from Switzerland, David

    1. Absolutely, that’s a great way as well – thanks for your valuable feedback! The only con is that it hasn’t been updated in 6 years as of today, so it could cause some problems or be vulnerable.

      1. That is unfortunately true that the plugin is not maintained, but it still works fine. Your reply was a reminder for me to check if I have removed the plugin after finishing the pages everywhere! Thank you!

  3. This is a brilliant resource. Thank you.

    1. Great!

  4. Hello Rodolfo,
    Using advanced custom fields allows you to output (print) the collected values to the front end website (pages, posts, single product page or on the product categories pages. To print these values, a PHP code is needed, but the author od ACF recommends to insert that code on the specific template page. You told us this is not the ideal method. My question is the approach to insert the code on the child theme function.php could be applied also for custom fields. Thank you!

    1. Excellent question Marcel. I recommend to study custom fields (and therefore ACF as well) after Module 4 – so that you can learn step by step. First, learn how to print some HTML, then learn how to display custom fields.

      Module 5 has a “Custom Fields” lesson and you can apply that to ACF as well. Here’s a quick snippet, for example, to print an ACF field on the WooCommerce single product page: https://businessbloomer.com/woocommerce-display-advanced-custom-fields-single-product/

Questions? Feedback? Support? Leave your comment now!
_____

If you are writing code, please wrap it between: [php]code_here[/php]

Your email address will not be published. Required fields are marked *