$_SESSION does not work in my wordpress plugin?

Question

I have developed a wordpress plugin for client portal. I use php session for login. It work for maximum site, but some of website $_SESSION is “only work if i login to wp-admin”, otherwise $_SESSION show NULL

For start session i use this

add_action('init', array($this, 'register_my_session'));
function register_my_session()
{
    if( !session_id() ) session_start();    
}
0
, , , Mahidul Islam 2 weeks 0 Answers 18 views 0

Leave an answer