Stock Qty Code
Thought I would share this PHP code that shows the available stock.
Works out pretty good with Techone with the locations of.
See attached.
****************************************************************************
add_action('woocommerce_after_shop_loop_item','bbloomer_show_stock_shop', 10);
function bbloomer_show_stock_shop() {
global $product;
if ( $product->stock ) { // if manage stock is enabled
if ( number_format( $product->stock,0,'','' ) < 3 ) { // if stock is low
echo 'Only ' . number_format($product->stock,0,'','') . ' left in stock!';
} else {
echo '' . number_format($product->stock,0,'','') . ' left in stock';
}
}
}