Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function backorder_text( $availability, $product ) {
- $product_ids = array( 1, 2, 3, 4, 5 );
- if ( in_array( $product->get_id(), $product_ids ) ){
- foreach( $availability as $i ) {
- $availability = str_replace( 'Available on backorder', 'This item may take 3-4 weeks to deliver', $availability );
- }
- }
- return $availability;
- }
- add_filter('woocommerce_get_availability', 'backorder_text', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement