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

Show Stock @ Shop Loop Item

MARK LESSON AS COMPLETE

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.

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 only visible to logged in Business Bloomer Club members with a PRO PASS.
If you joined already, please log in.
Otherwise, here is why you should join the Club.

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 *