In my custom Wordpress theme I want to keep some user's data stored over time (let's say 5 days) using $_SESSION variable.
At a certain point in my theme I do a very simple thing:
session_start(); $_SESSION['my_data'] = $my_object;
session_start() may be useless because it should have been called by Wordpress core before my script, but that's not the point. The problem is that my custom data gets erased after few hours, even if I change it to:
session_start(); session_set_cookie_params(432000); $_SESSION['my_data'] = $my_object;
I'm wondering how the $_SESSION variable is managed by the Wordpress code and if there is a way to extend its validity... or better to increase the validity by 5 days to just my data, that is always stored in