WC_Admin_Notices::maybe_remove_legacy_api_removal_notice()public staticWC 1.0

Remove the admin notice about the unsupported webhooks if the Legacy REST API plugin is installed.

Method of the class: WC_Admin_Notices{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = WC_Admin_Notices::maybe_remove_legacy_api_removal_notice();

WC_Admin_Notices::maybe_remove_legacy_api_removal_notice() code WC 9.8.5

public static function maybe_remove_legacy_api_removal_notice() {
	if ( self::has_notice( 'legacy_webhooks_unsupported_in_woo_90' ) && ( WC()->legacy_rest_api_is_available() || 0 === wc_get_container()->get( WebhookUtil::class )->get_legacy_webhooks_count() ) ) {
		self::remove_notice( 'legacy_webhooks_unsupported_in_woo_90' );
	}
}