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.
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.
If you joined already, please log in.
Otherwise, here is why you should join the Club.










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>'; }Nice!
I would love to see more on conditional logic. this a great class, I will be buying all your courses for sure.
Great to know!