Support » Plugin: WooCommerce » Placeholder for Emails – First name and last name

Viewing 6 replies - 1 through 6 (of 6 total)
  • crslz

    (@crslz)

    Hello,

    This can be found in the customer-on-hold-order.php template file

    https://github.com/woocommerce/woocommerce/blob/master/templates/emails/customer-on-hold-order.php#L26

    To adjust this is one of the options to copy/paste this template file to your theme folder, namely in this way

    * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-on-hold-order.php.

    And add the desired adjustments there

    more information about overwriting template files can be found here

    ————————

    So this

    <?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?>
    

    Becomes this

    <?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() . ' ' . $order->get_billing_last_name()  ) ); ?>
    

    ————————

    Note: you can apply the same for other emails with different
    statuses
    such as

    https://github.com/woocommerce/woocommerce/blob/master/templates/emails/customer-completed-order.php#L28

    https://github.com/woocommerce/woocommerce/blob/master/templates/emails/customer-processing-order.php#L28

    etc…

    carinajae

    (@carinajae)

    THANKS A LOT FOR YOUR HELP!!!! it works great!

    crslz

    (@crslz)

    @carinajae you’re welcome! can you mark this topic as resolved? regards

    carinajae

    (@carinajae)

    Thanks to all for your help!

    Hi again,

    sorry – one more questions.
    how can I link a text in the email. if I integrate html in the customer-on-hold-order.php it does not work. It looks like this:
    https://prnt.sc/qwdlvy

    <p><?php printf( esc_html__( ‘Hi %s,’, ‘woocommerce’ ), esc_html( $order->get_billing_first_name() . ‘ ‘ . $order->get_billing_last_name() ) ); ?></p>
    <p><?php esc_html_e( ‘Vielen Dank für Ihre Bestellung. Wir warten mit der Verarbeitung, bis wir bestätigen können, dass die Zahlung eingegangen ist. Inzwischen hier eine Erinnerung daran, was Sie bestellt haben. Klicken Sie <u>hier</u> um zu den Allgemeinen Geschäftsbedingungen zu gelangen.’, ‘woocommerce’ ); ?></p>

    What do I have to do?

    Thank you

    • This reply was modified 7 months, 4 weeks ago by carinajae. Reason: personalisiert

    Regards

    <p><?php printf( esc_html__( ‘Hi %s,’, ‘woocommerce’ ), esc_html( $order->get_billing_first_name() . ‘ ‘ . $order->get_billing_last_name() ) ); ?></p>
    <p><?php
        $the_url = 'https://www.domain.at/agb';
    
        printf(
            esc_html__( 'Vielen Dank für Ihre Bestellung. Wir warten mit der Verarbeitung, bis wir bestätigen können, dass die Zahlung eingegangen ist. Inzwischen hier eine Erinnerung daran, was Sie bestellt haben. Klicken Sie %1$s um zu den Allgemeinen Geschäftsbedingungen zu gelangen', 'woocommerce' ),
            sprintf(
                '<a href="%s" target="_blank">%s</a>',
                $the_url,
                esc_html__( 'Hier', 'woocommerce' )
            )
        );
    ?></p>
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Placeholder for Emails – First name and last name’ is closed to new replies.