• Hi,

    Is it possible to change the text “Billing & Shipping” at checkout, to something like “Enter dropship address”?

Viewing 5 replies - 1 through 5 (of 5 total)
  • hi Yes it is but can you clear what kind of text you want to change is that checkout form label text or field’s placeholder ????

    Thread Starter hyldahl82

    (@hyldahl82)

    That would be the checkout form labe

    // Hook in
    add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ );

    // Our hooked in function – $fields is passed via the filter!
    function custom_override_checkout_fields( $fields ) {
    $fields[‘order’][‘order_comments’][‘placeholder’] = ‘My new placeholder’;
    $fields[‘order’][‘order_comments’][‘label’] = ‘My new label’;
    return $fields;
    }

    the placeholder and label put in function.php and save then refresh page

    Thread Starter hyldahl82

    (@hyldahl82)

    umm, maybe I’ve misunderstood you. It’s the text “Billing & Shipping” I want to change. It’s the text located just above “First name”

    To change/translate single language strings add this to your theme’s functions.php file:

    // Change 'Billing & Shipping' text at checkout
    add_filter( 'gettext', 'translate_billing_shipping' );
    add_filter( 'ngettext', 'translate_billing_shipping' );
    function translate_billing_shipping( $translated ) {
    $translated = str_ireplace( 'Billing & Shipping', 'Dropship Address', $translated );
    return $translated;
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change text at checkout’ is closed to new replies.