• Resolved yarintosh

    (@yarintosh)


    Hi,

    I have a site that is set to always ship to the billing address. I’d like to change the “Billing & Shipping” header to “Shipping Details” only.

Viewing 4 replies - 16 through 19 (of 19 total)
  • @crdunst is right–you have to replace the & with & amp; (no space after the &)

    So:

    //Change the 'Billing details' checkout label to 'Contact Information'
    function wc_billing_field_strings( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
    case 'Billing & amp; Shipping' :
    $translated_text = __( 'It works!', 'woocommerce' );
    break;
    }
    return $translated_text;
    }
    add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 );

    Don’t forget to remove the space between & and amp;

    • This reply was modified 3 years, 4 months ago by andrewbraun.
    • This reply was modified 3 years, 4 months ago by andrewbraun.
    • This reply was modified 3 years, 4 months ago by andrewbraun.
    • This reply was modified 3 years, 4 months ago by andrewbraun.
    Penny

    (@thejanemorris)

    Amazing @andrewbraun – that finally worked! Thank you ??

    Glad to hear it finally worked for you!

    @andrewbraun Thanks for sharing it with everybody.

    I’ll mark this thread as resolved now. If you have any further questions, I recommend creating a new one.

    Cheers!

    //Change the 'Billing details' checkout label to 'Contact Information'
    function wc_billing_field_strings( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
    case 'Billing & Shipping' :
    $translated_text = __( 'It works!', 'woocommerce' );
    break;
    }
    return $translated_text;
    }
    add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 );

    It worked for me without a space in the amp;

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Change Billing & Shipping title’ is closed to new replies.