The wordpress website in WooCommerce shop page in show in-stock and out-stock quantity or status
You need to display in-stock and out-stock quantity status in Woocommerce website's
each product in the shop, category and archive pages.
Stock quantity show in woocommerce shop category and archive pages
Always use child theme any wordpress website and copy below code and add this code in your
functions.php and in woocommerce shop page.
Use this below in-stock and out-stock quantity shortcode for shop, category and archive pages-
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 );
}
0 Comments