diff --git a/plugins/woocommerce/changelog/49648-fix-43603-footer-text-color b/plugins/woocommerce/changelog/49648-fix-43603-footer-text-color new file mode 100644 index 00000000000..4f9a70f7ee0 --- /dev/null +++ b/plugins/woocommerce/changelog/49648-fix-43603-footer-text-color @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Add field for the email footer text color \ No newline at end of file diff --git a/plugins/woocommerce/changelog/fix-43603-footer-text-color b/plugins/woocommerce/changelog/fix-43603-footer-text-color new file mode 100644 index 00000000000..940d0071f2f --- /dev/null +++ b/plugins/woocommerce/changelog/fix-43603-footer-text-color @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Add an additional field for the email settings that sets the footer text color diff --git a/plugins/woocommerce/includes/admin/settings/class-wc-settings-emails.php b/plugins/woocommerce/includes/admin/settings/class-wc-settings-emails.php index 623e2ceaf88..6100551cd1a 100644 --- a/plugins/woocommerce/includes/admin/settings/class-wc-settings-emails.php +++ b/plugins/woocommerce/includes/admin/settings/class-wc-settings-emails.php @@ -130,19 +130,6 @@ class WC_Settings_Emails extends WC_Settings_Page { 'desc_tip' => true, ), - array( - 'title' => __( 'Footer text', 'woocommerce' ), - /* translators: %s: Available placeholders for use */ - 'desc' => __( 'The text to appear in the footer of all WooCommerce emails.', 'woocommerce' ) . ' ' . sprintf( __( 'Available placeholders: %s', 'woocommerce' ), '{site_title} {site_url}' ), - 'id' => 'woocommerce_email_footer_text', - 'css' => 'width:400px; height: 75px;', - 'placeholder' => __( 'N/A', 'woocommerce' ), - 'type' => 'textarea', - 'default' => '{site_title} — Built with {WooCommerce}', - 'autoload' => false, - 'desc_tip' => true, - ), - array( 'title' => __( 'Base color', 'woocommerce' ), /* translators: %s: default color */ @@ -191,6 +178,31 @@ class WC_Settings_Emails extends WC_Settings_Page { 'desc_tip' => true, ), + array( + 'title' => __( 'Footer text', 'woocommerce' ), + /* translators: %s: Available placeholders for use */ + 'desc' => __( 'The text to appear in the footer of all WooCommerce emails.', 'woocommerce' ) . ' ' . sprintf( __( 'Available placeholders: %s', 'woocommerce' ), '{site_title} {site_url}' ), + 'id' => 'woocommerce_email_footer_text', + 'css' => 'width:400px; height: 75px;', + 'placeholder' => __( 'N/A', 'woocommerce' ), + 'type' => 'textarea', + 'default' => '{site_title} — Built with {WooCommerce}', + 'autoload' => false, + 'desc_tip' => true, + ), + + array( + 'title' => __( 'Footer text color', 'woocommerce' ), + /* translators: %s: footer default color */ + 'desc' => sprintf( __( 'The footer text color. Default %s.', 'woocommerce' ), '#3c3c3c' ), + 'id' => 'woocommerce_email_footer_text_color', + 'type' => 'color', + 'css' => 'width:6em;', + 'default' => '#3c3c3c', + 'autoload' => false, + 'desc_tip' => true, + ), + array( 'type' => 'sectionend', 'id' => 'email_template_options', diff --git a/plugins/woocommerce/templates/emails/email-styles.php b/plugins/woocommerce/templates/emails/email-styles.php index 0fc699e887c..b51eb63563b 100644 --- a/plugins/woocommerce/templates/emails/email-styles.php +++ b/plugins/woocommerce/templates/emails/email-styles.php @@ -12,7 +12,7 @@ * * @see https://woocommerce.com/document/template-structure/ * @package WooCommerce\Templates\Emails - * @version 8.6.0 + * @version 9.3.0 */ if ( ! defined( 'ABSPATH' ) ) { @@ -20,11 +20,12 @@ 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' ); +$footer_text = get_option( 'woocommerce_email_footer_text_color' ); // Pick a contrasting color for links. $link_color = wc_hex_is_light( $base ) ? $base : $base_text; @@ -97,7 +98,7 @@ body { #template_footer #credit { border: 0; - color: ; + color: ; font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; font-size: 12px; line-height: 150%; @@ -190,6 +191,11 @@ body { display: block; } +#template_footer #credit, +#template_footer #credit a { + color: ; +} + h1 { color: ; font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; diff --git a/plugins/woocommerce/tests/php/includes/settings/class-wc-settings-emails-test.php b/plugins/woocommerce/tests/php/includes/settings/class-wc-settings-emails-test.php index 10e74e45fb9..f2c9166d83e 100644 --- a/plugins/woocommerce/tests/php/includes/settings/class-wc-settings-emails-test.php +++ b/plugins/woocommerce/tests/php/includes/settings/class-wc-settings-emails-test.php @@ -82,6 +82,7 @@ class WC_Settings_Emails_Test extends WC_Settings_Unit_Test_Case { 'woocommerce_email_background_color' => 'color', 'woocommerce_email_body_background_color' => 'color', 'woocommerce_email_text_color' => 'color', + 'woocommerce_email_footer_text_color' => 'color', 'email_merchant_notes' => array( 'title', 'sectionend' ), 'woocommerce_merchant_email_notifications' => 'checkbox', ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2f72e783c85..ab6a453dde7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2944,6 +2944,8 @@ importers: specifier: ^3.0.15 version: 3.0.15 + plugins/tiktok-for-business: {} + plugins/woo-ai: dependencies: '@automattic/tour-kit':