Automattic\WooCommerce\Internal\Admin\EmailImprovements
EmailImprovements::should_enable_email_improvements_for_existing_stores
Check if email improvements should be enabled for existing stores.
- The feature is not already enabled.
- The feature was not manually disabled.
- The email templates are not overridden.
- The email customizer is not enabled.
Method of the class: EmailImprovements{}
No Hooks.
Returns
true|false. True if email improvements should be enabled for existing stores, false otherwise.
Usage
$result = EmailImprovements::should_enable_email_improvements_for_existing_stores();
EmailImprovements::should_enable_email_improvements_for_existing_stores() EmailImprovements::should enable email improvements for existing stores code WC 10.7.0
public static function should_enable_email_improvements_for_existing_stores() {
if ( FeaturesUtil::feature_is_enabled( 'email_improvements' ) ) {
return false;
}
$manually_disabled_before = get_option( 'woocommerce_email_improvements_last_disabled_at' );
if ( $manually_disabled_before ) {
return false;
}
if ( self::has_email_templates_overridden() ) {
return false;
}
if ( self::is_email_customizer_enabled() ) {
return false;
}
// Temporarily paused roll-out to gather more feedback.
return false;
}