I am using Shoptmizer theme in WooCommerce. The label "preorder..." is properly shows in single product page.
How to show "Preorder only" when product is on backorder in the catalog (product archives)?
To show "Out of stock" badge in catalog when product is on backorder, try the following:
add_action( 'woocommerce_before_shop_loop_item_title', 'show_product_loop_backorder_badge', 5 );
function show_product_loop_backorder_badge(){
global $product;
if ( $product->is_on_backorder() ) {
printf('<span class="on-backorder">%s</span>', esc_html__('Preorder only', 'woocommerce'));
}
}
Code goes in function.php file of your child theme (or in a plugin). Tested and works.