Automattic\WooCommerce\Internal\Features
FeaturesController::display_email_improvements_feedback_notice
Display the email improvements feedback notice to render CES modal in.
Method of the class: FeaturesController{}
No Hooks.
Returns
null. Nothing (null).
Usage
$FeaturesController = new FeaturesController(); $FeaturesController->display_email_improvements_feedback_notice( $feature_id, $is_enabled ): void;
- $feature_id(string) (required)
- The feature id.
- $is_enabled(true|false) (required)
- Whether the feature is enabled.
FeaturesController::display_email_improvements_feedback_notice() FeaturesController::display email improvements feedback notice code WC 10.6.2
public function display_email_improvements_feedback_notice( $feature_id, $is_enabled ): void {
if ( 'email_improvements' === $feature_id && ! $is_enabled ) {
set_transient( 'wc_settings_email_improvements_reverted', 'yes', 15 );
add_action(
'admin_notices',
function () {
echo '<div id="wc_settings_features_email_feedback_slotfill"></div>';
}
);
}
}