I am using a php session variable to store and show some data between couple of wordpress page templates. It is working perfectly in my development server but the session variable is not getting set in the live wpengine hosting. I think they have some wordpress caching plugin enabled.
I am using the following code in the functions.php to enable session. Anyone have any idea to workaround this issue ?
function register_session() {
if ( ! session_id() ) {
session_start();
}
}
add_action( 'init', 'register_session' );