Created
March 27, 2019 20:43
-
-
Save LaurenaRehbein/8c34ed15f6f8b66814b662d3db021d45 to your computer and use it in GitHub Desktop.
Changes the text for backorder products
This file contains hidden or 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
add_filter( 'woocommerce_get_availability_text', 'lar_custom_change_availability_text', 15, 2 ); | |
function lar_custom_change_availability_text( $availability, $product ) { | |
if ( $product->backorders_require_notification() ) { | |
$availability = __( 'Custom text here', 'woocommerce' ); | |
} | |
return $availability; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment