admin管理员组文章数量:1315306
in the Hungarian language we generally use the Lastname + Firstname format when we communicate with each oter. Therefore I would like to change this method in Woocommerce and special in the client e-mail?
Where can I edit this emial template or should I use rather a filter? Thank you for your replies in advance! Joseph
in the Hungarian language we generally use the Lastname + Firstname format when we communicate with each oter. Therefore I would like to change this method in Woocommerce and special in the client e-mail?
Where can I edit this emial template or should I use rather a filter? Thank you for your replies in advance! Joseph
Share Improve this question asked Feb 1, 2018 at 8:05 József Kerekes - e-centralJózsef Kerekes - e-central 113 bronze badges2 Answers
Reset to default 1I figured out a workaround solution and it works, but not the most beautiful:
// I made the original action passive
// do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
// ... create a new solution from scratch
$text_align = is_rtl() ? 'right' : 'left';
//to escape # from order id
$order_id = trim(str_replace('#', '', $order->get_order_number()));
echo $order_id;
echo '<h2>' . __( 'Customer comments', 'woocommerce' ) . '</h2>';
$text = apply_filters('the_excerpt', get_post_field('post_excerpt', $order_id));
echo $text;
?>
<table id="addresses" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top;" border="0">
<tr>
<td class="td" style="text-align:<?php echo $text_align; ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" valign="top" width="50%">
<h3><?php _e( 'Számlázási cím', 'woocommerce' ); ?></h3>
<?php
echo $order->get_billing_last_name() . " ";
echo $order->get_billing_first_name() . "<br />";
echo $order->get_billing_address_1() . "<br />";
echo $order->get_billing_address_2() . "<br />";
echo $order->get_billing_postcode() . "<br />";
echo $order->get_billing_email() . "<br />";
echo $order->get_billing_phone() . "<br />";
?>
</td>
<td class="td" style="text-align:<?php echo $text_align; ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" valign="top" width="50%">
<h3><?php _e( 'Shipping address', 'woocommerce' ); ?></h3>
<?php
echo $order->get_shipping_last_name() . " ";
echo $order->get_shipping_first_name() . "<br />";
echo $order->get_shipping_address_1() . "<br />";
echo $order->get_shipping_postcode() . "<br />";
?>
</td>
</tr>
</table>
<?php
/**
* @hooked WC_Emails::email_footer() Output the email footer
*/ ...
Edit your store's email templates, go to WooCommerce > Settings > Emails from here you can edit your email template.
本文标签: woocommerce offtopicChange Firstname amp Lastname order in the orderprocessing email templates
版权声明:本文标题:woocommerce offtopic - Change Firstname & Lastname order in the order-processing e-mail templates 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741978694a2408271.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论