$_SESSION does not work in my wordpress plugin?


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();    


>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/_session-does-not-work-in-my-wordpress-plugin/">

$_SESSION does not work in my wordpress plugin?</a>
, , , Mahidul Islam 6 months 0 Answers 39 views 0

Leave an answer