• Resolved jamesscaife

    (@jamesscaife)


    Hi

    I want to change the ‘add 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

  • The topic ‘[Plugin: Woocommerce] – Replacing 'Add To Back Order' Text To Custom Field’ is closed to new replies.