Woocommerce backorder information
-
Hey everyone. I have a store setup and working great but wanted to make my customers better onformed about back orders. To accomplish this, I want to have the backorder text become “Available on backorder (What is a backorder?)” with a link to the page with a detailed description of what a backorder entails.
I did find some code to replace the string for backorders with my own text, but im not very familiar with PHP and I’m not sure how to add a link inside as well. Your help would be appreciated.
Here is the code I’m using ATM in my child theme:
function backorder_text($available) {
foreach($available as $i) {
$available = str_replace(‘Available on backorder’, ‘YOUR NEW TEXT GOES HERE’, $available);
}
return $available; } add_filter(‘woocommerce_get_availability’, ‘backorder_text’);
- The topic ‘Woocommerce backorder information’ is closed to new replies.