From 2b70daffe65180eaf53cf91f77258e5467e290ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Mikl=C3=A1=C5=A1?= Date: Wed, 13 Nov 2024 10:15:34 +0100 Subject: [PATCH] Improve description of "Email sender options" (#52267) * Add description for "Email sender options" settings * Remove no longer needed descriptions in "From" name and address * Add changelog * Fix tests --- .../changelog/52216-improve-email-sender-options | 5 +++++ .../admin/settings/class-wc-settings-emails.php | 6 +++--- .../tests/api-tests/settings/settings-crud.test.js | 10 ++++------ 3 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 plugins/woocommerce/changelog/52216-improve-email-sender-options diff --git a/plugins/woocommerce/changelog/52216-improve-email-sender-options b/plugins/woocommerce/changelog/52216-improve-email-sender-options new file mode 100644 index 00000000000..d5269d68977 --- /dev/null +++ b/plugins/woocommerce/changelog/52216-improve-email-sender-options @@ -0,0 +1,5 @@ +Significance: patch +Type: tweak +Comment: This change only moves an "Email sender options" settings descriptions into section description. + + 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 25fb5141ff3..83b4f96c4df 100644 --- a/plugins/woocommerce/includes/admin/settings/class-wc-settings-emails.php +++ b/plugins/woocommerce/includes/admin/settings/class-wc-settings-emails.php @@ -84,13 +84,13 @@ class WC_Settings_Emails extends WC_Settings_Page { array( 'title' => __( 'Email sender options', 'woocommerce' ), 'type' => 'title', - 'desc' => '', + 'desc' => __( "Set the name and email address you'd like your outgoing emails to use.", 'woocommerce' ), 'id' => 'email_options', ), array( 'title' => __( '"From" name', 'woocommerce' ), - 'desc' => __( 'How the sender name appears in outgoing WooCommerce emails.', 'woocommerce' ), + 'desc' => '', 'id' => 'woocommerce_email_from_name', 'type' => 'text', 'css' => 'min-width:400px;', @@ -101,7 +101,7 @@ class WC_Settings_Emails extends WC_Settings_Page { array( 'title' => __( '"From" address', 'woocommerce' ), - 'desc' => __( 'How the sender email appears in outgoing WooCommerce emails.', 'woocommerce' ), + 'desc' => '', 'id' => 'woocommerce_email_from_address', 'type' => 'email', 'custom_attributes' => array( diff --git a/plugins/woocommerce/tests/e2e-pw/tests/api-tests/settings/settings-crud.test.js b/plugins/woocommerce/tests/e2e-pw/tests/api-tests/settings/settings-crud.test.js index e7caee7e0b4..cc52c408d18 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/api-tests/settings/settings-crud.test.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/api-tests/settings/settings-crud.test.js @@ -1496,11 +1496,10 @@ test.describe.serial( 'Settings API tests: CRUD', () => { expect.objectContaining( { id: 'woocommerce_email_from_name', label: '"From" name', - description: - 'How the sender name appears in outgoing WooCommerce emails.', + description: '', type: 'text', default: expect.any( String ), - tip: 'How the sender name appears in outgoing WooCommerce emails.', + tip: '', value: expect.any( String ), } ), ] ) @@ -1510,11 +1509,10 @@ test.describe.serial( 'Settings API tests: CRUD', () => { expect.objectContaining( { id: 'woocommerce_email_from_address', label: '"From" address', - description: - 'How the sender email appears in outgoing WooCommerce emails.', + description: '', type: 'email', default: expect.any( String ), - tip: 'How the sender email appears in outgoing WooCommerce emails.', + tip: '', value: expect.any( String ), } ), ] )