Add some cookies to this array to filter to be excluded from deletion if cookies are declined.
wordpress_gdpr_necessary_cookies
Description
apply_filters('wordpress_gdpr_necessary_cookies', $allowedCookies);
Example Use
// define the wordpress_gdpr_necessary_cookies callback function my_custom_allowed_cookies( $allowedCookies ) { $allowedCookies[] = 'my_needed_cookie_key'; return $allowedCookies; }; // add the filter add_filter( 'wordpress_gdpr_necessary_cookies', 'my_custom_allowed_cookies', 10, 1 );