From cc31da4d55e287ffdd1a67eb674cabd7c3d57203 Mon Sep 17 00:00:00 2001
From: Grzegorz Rola <grola@seostudio.pl>
Date: Mon, 11 Mar 2024 12:36:35 +0100
Subject: [PATCH] bugfix(ajax): permission check

---
 src/WPDesk/Notice/AjaxHandler.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/WPDesk/Notice/AjaxHandler.php b/src/WPDesk/Notice/AjaxHandler.php
index 64c8717..fc3e674 100644
--- a/src/WPDesk/Notice/AjaxHandler.php
+++ b/src/WPDesk/Notice/AjaxHandler.php
@@ -79,7 +79,7 @@ class AjaxHandler implements HookablePluginDependant {
             $noticeName = sanitize_text_field( $_POST[ self::POST_FIELD_NOTICE_NAME ] );
 
             $option_name = PermanentDismissibleNotice::OPTION_NAME_PREFIX . $noticeName;
-            ajax_check_referer( $option_name, self::POST_FIELD_SECURITY );
+            \ajax_check_referer( $option_name, self::POST_FIELD_SECURITY );
 
             if ( ! current_user_can( 'edit_posts' ) ) {
                 wp_send_json_error();
-- 
GitLab