Hello
i have place this under child theme but still no changes ..my question was
how do i place the out of stock to be after price in text not an image https://ibb.co/ZWhMYBz
Add the below code to functions.php of your child theme
// display an 'Out of Stock' label below the price
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_stock', 10 );
function woocommerce_template_loop_stock() {
global $product;
if ( ! $product->is_in_stock() )
echo '<p class="stock out-of-stock">Out of Stock</p>';
}
And the code below to child theme style.css
.content-product .stock.out-of-stock {
position: relative;
transform: none;
text-align: center;
left: auto;
top: auto;
}
.content-product .product-image-wrapper .stock.out-of-stock {
display: none;
}