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 10.5.0
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' );
}
}