WC_Admin_Notices::maybe_remove_legacy_api_removal_notice
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() WC Admin Notices::maybe remove legacy api removal notice code WC 10.6.2
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' );
}
}