• Resolved foodstijl

    (@foodstijl)


    Hi,
    Excellent plugin.
    I’m wondering how I can add the salutation the user picks on checkout to the email the user receives after checkout.

    Dear {salutation} {last name},

    Thank you for your order…..

    in the customer-processing-order.php on line 28
    <p><?php printf( esc_html__( ‘Dear %s,’, ‘woocommerce’ ), esc_html( $order->get_billing_last_name() ) ); ?></p>

    How can I add the F4 salutation to this?

    Hope you can help. Thanks in advance.

    Kind regards,
    Emile

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author FAKTOR VIER

    (@faktorvier)

    Hi @foodstijl

    You can replace

    <p><?php printf( esc_html__( ‘Dear %s,’, ‘woocommerce’ ), esc_html( $order->get_billing_last_name() ) ); ?></p>

    with

    <p><?php echo \F4\WCSF\Core\Hooks::get_option_label(get_post_meta($order->get_id(), '_billing_salutation', true)); ?> <?php echo esc_html( $order->get_billing_last_name() ); ?></p>

    That should display the salutation instead of “Dear”.

    Thread Starter foodstijl

    (@foodstijl)

    @faktorvier thanks. it works perfect.

    I just added “Dear” in front of it ??

    <p><?php echo esc_html( Dear ); ?> <?php echo \F4\WCSF\Core\Hooks::get_option_label(get_post_meta($order->get_id(), ‘_billing_salutation’, true)); ?> <?php echo esc_html( $order->get_billing_last_name() ); ?></p>

    Thank you very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get salutation at the top of the order email’ is closed to new replies.