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.
Метод класса: WC_Admin_Notices{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$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 WC 9.5.1
private 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' ); } }