[php]

add_action( ‘woocommerce_before_shop_loop_item_title’, function() {
global $product;if ( !$product->is_in_stock() ) {
echo ‘<span class="onsale soldout">Sold Out</span>’;
}
});

[/php]

Woocoommerce Loop 템플릿에 직접 삽입 할수도 있다.


 

WooCommerce Sold Out Products