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
This commit is contained in:
Ján Mikláš 2024-11-13 10:15:34 +01:00 committed by GitHub
parent 295a2d83e2
commit 2b70daffe6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 9 deletions

View File

@ -0,0 +1,5 @@
Significance: patch
Type: tweak
Comment: This change only moves an "Email sender options" settings descriptions into section description.

View File

@ -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(

View File

@ -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 ),
} ),
] )