Merge pull request #30404 from woocommerce/fix/30390

Fix 'woocommerce_email_settings' filter being triggered twice
This commit is contained in:
Claudio Sanches 2021-08-02 14:44:31 -03:00 committed by GitHub
commit 23ae6993ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -51,8 +51,7 @@ class WC_Settings_Emails extends WC_Settings_Page {
'https://wordpress.org/plugins/wp-mail-logging/',
'https://docs.woocommerce.com/document/email-faq'
);
$settings = apply_filters(
'woocommerce_email_settings',
$settings =
array(
array(
'title' => __( 'Email notifications', 'woocommerce' ),
@ -217,8 +216,7 @@ class WC_Settings_Emails extends WC_Settings_Page {
'type' => 'sectionend',
'id' => 'email_merchant_notes',
),
)
);
);
return apply_filters( 'woocommerce_email_settings', $settings );
}

View File

@ -5,7 +5,6 @@
* @package WooCommerce\Tests\Settings
*/
use Automattic\WooCommerce\Testing\Tools\CodeHacking\Hacks\FunctionsMockerHack;
use Automattic\WooCommerce\Testing\Tools\CodeHacking\Hacks\StaticMockerHack;
require_once __DIR__ . '/class-wc-settings-unit-test-case.php';