Automattic\WooCommerce\Internal\MCP

McpEndpointRemoval::should_show_removed_notice │ private │ WC 1.0

Check whether the removal notice should show to the current user.

Method of the class: McpEndpointRemoval{}

No Hooks.

Returns

bool.

Usage

// private - for code of main (parent) class only
$result = $this->should_show_removed_notice(): bool;

McpEndpointRemoval::should_show_removed_notice() code WC 11.3.0

private function should_show_removed_notice(): bool {
	return 'yes' === get_option( self::FEATURE_OPTION )
		&& current_user_can( 'manage_woocommerce' )
		&& ! \WC_Admin_Notices::user_has_dismissed_notice( self::REMOVED_NOTICE );
}