Thanks @Nigel, I've tested this, but it looks like get_current_user_id() is empty when it's called in get_all_notices(), probably because it's called before all the wordpress functions are loaded. So this solution doesn't seem to work just yet.
Also... it's still setting notices with every ajax call, when the user_id is 0 as well.
Sorry, I checked the internal tickets and it still isn't fixed yet.
It is on a bugs list along with some other confirmed issues. What tends to happen is these get worked on together in a dedicated bug-squashing sprint, but I can't say quite when that will be.
You will need to continue to apply the workarounds for now.
Sorry about the lack of progress. The team have been working exhaustively on the upcoming major 4.7 update for many months now, and somewhat peripheral issues like this have been scheduled for once that work completes.
Hopefully that won't be too long and they will be able to address this problem.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.