My Courses > CustomizeWoo > Module 6 > Lesson 04: Show Stock @ Shop Loop Item

Show Stock @ Shop Loop Item


You can use this exercise as a test. Stop the video after the project description and see if you can manage to find the PHP solution. Then continue watching the video to watch me code the task.


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 “Show Stock @ Shop Loop Item

  1. Great one! My code:

    add_action( 'woocommerce_after_shop_loop_item_title', 'stock_qty_after_shop_loop_title', 1 );
    function stock_qty_after_shop_loop_title() {
        global $product;
        $qty = $product->get_stock_quantity();
        echo '<p>' . $qty . ' in stock</p>';
    1. Nice!

  2. I would love to see more on conditional logic. this a great class, I will be buying all your courses for sure.

    1. Great to know!

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 *