Replaces the default WooCommerce backorder availability text with a custom, translation-ready message. Useful for stores that want to set clear shipping expectations for customers ordering backordered products.
add_filter( 'woocommerce_get_availability_text', function( $availability, $product ) {
if ( $product->is_on_backorder() ) {
$availability = __( 'Available on backorder — typically ships within 1–8 weeks.', 'woocommerce' );
}
return $availability;
}, 10, 2 );