Unfortunately it did not work. I did try and add the filter however it still displayed in stock.
Would this work?
function phami_label_stock(){
global $product;
$stock = ( $product->is_in_stock() )? 'in-stock' : 'out-stock' ; ?>
<div class="product-stock <?php echo esc_attr( $stock ); ?>">
<span><?php esc_html_e( 'Availability:', 'phami' ); ?></span>
<i class="fa fa-check"></i><span class="stock"><?php if( $product->is_in_stock() ){ echo esc_html__( 'In Stock', 'phami' ); } elseif ( $_product->backorders_allowed() ) { echo esc_html__( 'Back in Order', 'phami' ); } else{ echo esc_html__( 'Out of Stock', 'phami' ); } ?></span>
<?php }
???
-
This reply was modified 4 years, 9 months ago by oliver7772.