Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Woocommerce Change Backorder Message
// Here I have used a 3 line message with inline styles to change the color and add line breaks
// Adapt this as you see fit
// Use Code Snippets Plugin to add this function or add yourself to functions.php of your child theme
function mywoo_backorder_message( $text, $product ){
if ( $product->managing_stock() && $product->is_on_backorder( 1 ) ) {
$text = __( '<strong><p style="color:green">New Stock is on its way !!!!<br>Backorder now - first come first served<br>Please allow 1 – 3 weeks for delivery of this item</p></strong><br>', 'your-textdomain' );
return $text;
add_filter( 'woocommerce_get_availability_text', 'mywoo_backorder_message', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment