With This PHP Code it will show the “stock quantity or status” under each product in the shop, category and archive pages.
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
);
}