PLEASE HELP!!! Adding Custom Field to 'available on back order' message…
-
Hi Guys
DESPERATLEY need advice, I’m tearing my hair out on this one!
I want to change the ‘available to back order’ text that displays for products on back order on the product pages to display my ‘Lead Time’ custom Field.
I’ve done this:
function backorder_text($available) { foreach($available as $i) { $available = str_replace('Available on backorder', '<div class="prod-code pc-leadtime">Lead Time: ', $available); } return $available; } add_filter('woocommerce_get_availability', 'backorder_text'); But unfortunatley it only displays the custom fields title and not the content, which in this case is “Made for you in just eight weeks”
Look forward to hearing your thoughts ??
KR
James
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘PLEASE HELP!!! Adding Custom Field to 'available on back order' message…’ is closed to new replies.