Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Forked from ideadude/pmpro_start_session.php
Created August 14, 2018 13:52
Show Gist options
  • Save andrewlimaza/1a8bf884bf5bf2c6c4e7776b3335a9a1 to your computer and use it in GitHub Desktop.
Save andrewlimaza/1a8bf884bf5bf2c6c4e7776b3335a9a1 to your computer and use it in GitHub Desktop.
Tell PMPro to start the PHP session earlier.
/**
* Add this code into a custom plugin.
* You could also add a direct call to session_start() in your wp-config.php
* or another piece of code that runs early.
*/
add_action('plugins_loaded', 'pmpro_start_session');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment