2016-04-13 9 views
0

Fatura ayrıntılarını (ad, e-posta ve telefon numarası) Woocommerce e-postaya nasıl ekleyebilirim?Fatura ayrıntılarını Woocommerce e-postaya nasıl eklerim?

<tr> 
<th scope="row"><?php _e('Customer Email', 'woocommerce-appointments'); ?></th> 
<td>**HERE**</td> 
</tr> 
: Bu (Müşteri adı için örneğin) içine ad, e-posta ve telefon eklemek istediğiniz

<?php do_action('woocommerce_email_header', $email_heading); ?> 

<?php if ($appointment->get_order() && $appointment->get_order()->billing_first_name && $appointment->get_order()->billing_last_name) : ?> 
<p><?php printf($opening_paragraph, $appointment->get_order()->billing_first_name . ' ' . $appointment->get_order()->billing_last_name); ?></p> 
<?php endif; ?> 

<table> 
<tbody> 
    <?php if ($appointment->has_staff() && ($staff = $appointment->get_staff_member())) : ?> 
     <tr> 
      <th scope="row"><?php _e('Appointment Provider', 'woocommerce-appointments'); ?></th> 
      <td><?php echo $staff->display_name; ?></td> 
     </tr> 
    <?php endif; ?> 
    <tr> 
     <th scope="row"><?php _e('Appointment Date', 'woocommerce-appointments'); ?></th> 
     <td><?php echo $appointment->get_start_date(wc_date_format(), ''); ?></td> 
    </tr> 
    <tr> 
     <th scope="row"><?php _e('Appointment Time', 'woocommerce-appointments'); ?></th> 
     <td><?php echo $appointment->get_start_date('', get_option('time_format')) . ' &mdash; ' . $appointment->get_end_date('', get_option('time_format')); ?></td> 
    </tr> 
    <tr> 
     <th scope="row"><?php _e('Appointment Time', 'woocommerce-appointments'); ?></th> 
     <td><?php echo $appointment->get_start_date('', get_option('time_format')) . ' &mdash; ' . $appointment->get_end_date('', get_option('time_format')); ?></td> 
    </tr> 
</tbody> 
</table> 

<?php do_action('woocommerce_email_footer'); ?> 

: Burada

Ben e-postalar göndermek kullanıyorum WooCommerce-randevu eklentisinden kodudur

Eğer birileri yardım edebilirse gerçekten çok memnun olurum.

Teşekkürler.

+0

Eğer' do_action ('woocommerce_email_customer_details', $ düzen, $ sent_to_admin, $ plain_text) denedin mi: Ama çıkışına gerçekten basit bir şekilde ad, e-posta ve telefon yönetilen? Bu işlem kancası temel olarak müşteri bilgilerini e-postayla müşteri bilgilerini (faturalama ayrıntıları ve gönderim ayrıntıları) görüntüleyen müşteri işleme-siparişi.php e-posta şablonundan alır. Diğer eklenti e-posta şablonlarında kullanmayı denemedim, sanırım çalışabilirim. – zipkundan

+0

Bunu okuduğunuz var mı: [** Woocommerce e-postaları - faturalandırma bilgisi nasıl eklenir **] (https://support.woothemes.com/hc/en-us/community/posts/202285577-Woocommerce-emails-how- to-add-information-of-billing-), biraz eski ama ilginç olabilir… – LoicTheAztec

cevap

0

Sipariş e-postalarınıza, özel alanın adını girerek ve belirterek herhangi bir özel alan ekleyebilirsiniz.

Aşağıdaki kodu, theme functions.php dosyanıza kopyalayın ve yeni oluşturulan özel alanınızı eklemek için WooCommerce> Checkout Fields bölümüne gidin. İşte

/** 
* Add the field to order emails 
**/ 
add_filter('woocommerce_email_order_meta_keys', 'my_woocommerce_email_order_meta_keys'); 


function my_woocommerce_email_order_meta_keys($keys) { 
    $keys['How did you hear about us?'] = 'hear_about_us'; 
    return $keys; 
} 

WooCommerce ait Ödeme Alan Editör uzantısını kullanarak bir örnektir> Ödeme Field özel alan için ayarları etiketli oluşturulan 'hear_about_us': enter image description here bu örneği kullanarak kod şöyle olacaktır:

$keys['How did you hear about us?'] = 'hear_about_us'; 
0

Cevaplar için teşekkürler. Ne yazık ki ne işe yaramadı. ; `

echo $appointment->get_order()->billing_first_name . ' ' . $appointment->get_order()->billing_last_name; 
echo $appointment->get_order()->billing_email; 
echo $appointment->get_order()->billing_phone;