From d86ce7a0d861fa66c4ceeadb31de1f9dac61f365 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 15 Jan 2019 15:59:25 +0000 Subject: [PATCH 1/2] Fixed padding of addresses in email template --- templates/emails/email-addresses.php | 24 +++++++++++++----------- templates/emails/email-styles.php | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/templates/emails/email-addresses.php b/templates/emails/email-addresses.php index 0bcd1dbfd61..ce1887c7939 100644 --- a/templates/emails/email-addresses.php +++ b/templates/emails/email-addresses.php @@ -10,9 +10,9 @@ * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * - * @see https://docs.woocommerce.com/document/template-structure/ - * @package WooCommerce/Templates/Emails - * @version 3.2.1 + * @see https://docs.woocommerce.com/document/template-structure/ + * @package WooCommerce/Templates/Emails + * @version 3.5.4 */ if ( ! defined( 'ABSPATH' ) ) { @@ -20,27 +20,29 @@ if ( ! defined( 'ABSPATH' ) ) { } $text_align = is_rtl() ? 'right' : 'left'; +$address = $order->get_formatted_billing_address(); +$shipping = $order->get_formatted_shipping_address(); ?> - - needs_shipping_address() && ( $shipping = $order->get_formatted_shipping_address() ) ) : ?> - diff --git a/templates/emails/email-styles.php b/templates/emails/email-styles.php index e5ef89bc388..e6f3a51c4d8 100644 --- a/templates/emails/email-styles.php +++ b/templates/emails/email-styles.php @@ -137,7 +137,7 @@ $text_lighter_20 = wc_hex_lighter( $text, 20 ); } .address { - padding: 12px 12px 0; + padding: 12px; color: ; border: 1px solid ; } From 34a4457a0d99b6326aa757f69d0e3f0facd3ee2d Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 17 Jan 2019 13:33:57 +0000 Subject: [PATCH 2/2] phpcs --- templates/emails/email-styles.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/templates/emails/email-styles.php b/templates/emails/email-styles.php index e6f3a51c4d8..427068d864e 100644 --- a/templates/emails/email-styles.php +++ b/templates/emails/email-styles.php @@ -20,16 +20,17 @@ if ( ! defined( 'ABSPATH' ) ) { } // Load colors. -$bg = get_option( 'woocommerce_email_background_color' ); -$body = get_option( 'woocommerce_email_body_background_color' ); -$base = get_option( 'woocommerce_email_base_color' ); -$base_text = wc_light_or_dark( $base, '#202020', '#ffffff' ); -$text = get_option( 'woocommerce_email_text_color' ); +$bg = get_option( 'woocommerce_email_background_color' ); +$body = get_option( 'woocommerce_email_body_background_color' ); +$base = get_option( 'woocommerce_email_base_color' ); +$base_text = wc_light_or_dark( $base, '#202020', '#ffffff' ); +$text = get_option( 'woocommerce_email_text_color' ); // Pick a contrasting color for links. -$link = wc_hex_is_light( $base ) ? $base : $base_text; +$link_color = wc_hex_is_light( $base ) ? $base : $base_text; + if ( wc_hex_is_light( $body ) ) { - $link = wc_hex_is_light( $base ) ? $base_text : $base; + $link_color = wc_hex_is_light( $base ) ? $base_text : $base; } $bg_darker_10 = wc_hex_darker( $bg, 10 ); @@ -190,7 +191,7 @@ h3 { } a { - color: ; + color: ; font-weight: normal; text-decoration: underline; }
-

+
+

- get_formatted_billing_address() ) ? $address : __( 'N/A', 'woocommerce' ); ?> + get_billing_phone() ) : ?>
get_billing_phone() ); ?> get_billing_email() ) : ?> -

get_billing_email() ); ?>

+
get_billing_email() ); ?>
-

+ needs_shipping_address() && $shipping ) : ?> +
+

-
+