Fixed the labels in customer details

This commit is contained in:
claudiosmweb 2014-11-12 22:33:47 -02:00
parent 8c8159ec55
commit 7200b449dc
1 changed files with 6 additions and 9 deletions

View File

@ -300,7 +300,6 @@ class WC_Emails {
/** /**
* Add customer details to email templates. * Add customer details to email templates.
* *
* @access public
* @param mixed $order * @param mixed $order
* @param bool $sent_to_admin (default: false) * @param bool $sent_to_admin (default: false)
* @param bool $plain_text (default: false) * @param bool $plain_text (default: false)
@ -310,23 +309,23 @@ class WC_Emails {
$meta = array(); $meta = array();
$show_fields = array(); $show_fields = array();
if ( $order->billing_email ) { if ( $order->billing_email ) {
$show_fields['billing_email'] = array( $show_fields['billing_email'] = array(
'label' => __( 'Email:', 'woocommerce' ), 'label' => __( 'Email', 'woocommerce' ),
'value' => wptexturize( $order->billing_email ) 'value' => wptexturize( $order->billing_email )
); );
} }
if ( $order->billing_phone ) { if ( $order->billing_phone ) {
$show_fields['billing_phone'] = array( $show_fields['billing_phone'] = array(
'label' => __( 'Tel:', 'woocommerce' ), 'label' => __( 'Tel', 'woocommerce' ),
'value' => wptexturize( $order->billing_phone ) 'value' => wptexturize( $order->billing_phone )
); );
} }
$show_fields = apply_filters( 'woocommerce_email_customer_details_keys', $show_fields, $sent_to_admin, $order ); $show_fields = apply_filters( 'woocommerce_email_customer_details_keys', $show_fields, $sent_to_admin, $order );
if( $show_fields ){ if ( $show_fields ) {
$heading = $sent_to_admin ? __( 'Customer details', 'woocommerce' ) : __( 'Your details', 'woocommerce' ); $heading = $sent_to_admin ? __( 'Customer details', 'woocommerce' ) : __( 'Your details', 'woocommerce' );
@ -360,13 +359,11 @@ class WC_Emails {
/** /**
* Get the email addresses. * Get the email addresses.
* *
* @access public
* @return void * @return void
*/ */
function email_addresses( $order, $sent_to_admin = false, $plain_text = false ) { function email_addresses( $order, $sent_to_admin = false, $plain_text = false ) {
wc_get_template( 'emails/email-addresses.php', array( 'order' => $order ) ); wc_get_template( 'emails/email-addresses.php', array( 'order' => $order ) );
} }
/** /**
* Get blog name formatted for emails * Get blog name formatted for emails