My Courses > CustomizeWoo > Module 2 > Lesson 02: Template Files Overview

Template Files Overview

MARK LESSON AS COMPLETE

The most important folder of the WooCommerce plugin is the template folder. It contains the most important PHP files, the ones we will customize.

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

4 thoughts on “Template Files Overview

  1. Hi Rodolfo, I am implementing https://businessbloomer.com/woocommerce-add-plus-minus-buttons-to-add-to-cart-quantity-input/. Instead of copy-pasting like I normally do, I am now trying to read the snippet and understand what’s happening. But I’m sure my thinking is wrong somewhere… (Please skip to the bottom before replying. :-P)

    My understanding is that woocommerce_before_add_to_cart_quantity is a hook? I wanted to go look for it, so I can see with which update it was introduced. I looked in wc-template-hooks.php, but it’s not there. Then I looked in single-product.php, which told me to refer to content-single-product.php for that area. But also, nothing there. The closest I get to is woocommerce_template_single_add_to_cart, which is not it. (Just trying to explain my thinking, as it’s my thinking I need to improve!)

    Oh gosh! And as I am writing this, I got a lightbulb moment and checked the add-to-cart folder. Et voilá, there it is, in simple.php. 😀 Sometimes writing a thought process out helps one understand better.

    (Decided to post this comment anyways. Maybe it’s useful to someone?)

    1. Excellent question Noelle, and this is exactly how I want students to figure things out. In module 5 you will learn a way to do a “file search”, and in this way you could have saved some time and found the “woocommerce_before_add_to_cart_quantity” hook in 1 minute.

      But yes, it’s a hook, and indeed it’s triggered just before the quantity – so that’s why in the snippet I use that to print the “plus” button. Well done and keep going like this 🙂

      1. Awesome! Looking forward to module 5.

    2. Thank you for sharing this Noëlle 🙂

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 *