Created
June 14, 2021 05:51
-
-
Save mitchellkrogza/decb43ac86d8f184114efa51733d5ec0 to your computer and use it in GitHub Desktop.
Change Woocommerce backorder message text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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