With This PHP Code  it will show the “stock quantity or status” under each product in the shop, category and archive pages.

woocommerce-show-stock-shop-page

Code :

add_action( 'woocommerce_after_shop_loop_item', 'bbloomer_show_stock_shop', 10 );
 
function bbloomer_show_stock_shop() {
   global $product;
   echo wc_get_stock_html( $product );
}
Written by