Automattic\WooCommerce\Internal\Features

FeaturesController::display_email_improvements_feedback_notice()publicWC 1.0

Display the email improvements feedback notice to render CES modal in.

Method of the class: FeaturesController{}

No Hooks.

Return

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() code WC 9.8.2

public function display_email_improvements_feedback_notice( $feature_id, $is_enabled ): void {
	if ( 'email_improvements' === $feature_id && ! $is_enabled ) {
		add_action(
			'admin_notices',
			function () {
				echo '<div id="wc_settings_features_email_feedback_slotfill"></div>';
			}
		);
	}
}