• The WP Session Manager plugin is throwing below error:

    Another plugin is attempting to start a session with WordPress. WP Session Manager will not work!

    I did some research and found the WP Advanced PDF plugin is calling session_start() outside of the plugins_loaded hook and running too early that means before loading of WP Session Manager plugin.

    Can you please fix this.

    thanks

Viewing 1 replies (of 1 total)
  • Thread Starter Devendra Singh Bhandari

    (@devendra21986)

    I have one suggestion here. We can change the current code using function.

    Current plugin code:

    if (!session_id()) {
        session_start();
    }

    Start session using plugins_loaded hook:

    add_action( 'plugins_loaded', 'wp_advanced_pdf_start_session' );
    function wp_advanced_pdf_start_session() {
    	if ( ! session_id() ) {
    		session_start();
    	}
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Need to fix session_start function’ is closed to new replies.