Are native PHP sessions allowed in my plugin?
-
Hi,
Long time ago I’ve used the native PHP
$_SESSION
for storing a temporary value for my contact form.Because WP itself doesn’t use these sessions and the Site Health tool returns a warning, it’s my understanding that it’s not allowed to use them in a theme / plugin that is hosted at org.
So I’ve switched to native WP transients to tackle this. A (temporary) transient is created per IP-address, but when there’s much traffic on my contact form page this results in many (temporary) DB entries. That’s why I prefer the use of a native PHP$_SESSION
.So could anyone tell me whether I’m allowed or not to use native PHP sessions in my plugin that is hosted at org? If I’m not, please give me the source info for that.
Or maybe not multiple transients, but only 1 static transient that holds an array of values?Guido
- You must be logged in to reply to this topic.