Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Change Woocommerce backorder message text
// Change backorder message text
function change_backorder_message( $text, $product ){
    if ( $product->managing_stock() && $product->is_on_backorder( 1 ) ) {
        $text = __( 'Place your text here', 'woocommerce' );
    }
    return $text;
}
add_filter( 'woocommerce_get_availability_text', 'change_backorder_message', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment