ETIQUETA DE AGOTADO WOOCOMMERCE

add_action( ‘woocommerce_after_shop_loop_item_title’, ‘dcms_show_out_stock’, 10 );
function dcms_show_out_stock() {
global $product;
if ( $product->managing_stock() && ! $product->is_in_stock() ){
echo ‘<p class=”stock out-of-stock”>’.__(‘Out of stock’,’woocommerce’).'</p>’;
}
}

add_action( ‘woocommerce_after_shop_loop_item_title’, ‘dcms_show_out_stock’, 10 );
function dcms_show_out_stock() {
global $product;
if ( $product->managing_stock() && ! $product->is_in_stock() ){
echo ‘<p class=”stock out-of-stock”>’.__(‘Out of stock’,’woocommerce’).'</p>’;
}
}

Entradas relacionadas