Skip to content

Commit

Permalink
ENHANCEMENT: You can now define('PMPRO_USE_SESSIONS', false); in your…
Browse files Browse the repository at this point in the history
… wp-config.php to force PMPro to skip the call to session_start. Note that PayPal Express and some addons require sessions to function.
  • Loading branch information
ideadude committed Nov 11, 2016
1 parent d7e6aeb commit bae5e4e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
29 changes: 13 additions & 16 deletions paid-memberships-pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,20 @@
define("PMPRO_USER_AGENT", "Paid Memberships Pro v" . PMPRO_VERSION . "; " . site_url());

//if the session has been started yet, start it (ignore if running from command line)
if(defined('STDIN') )
{
//command line
if(!defined('PMPRO_USE_SESSIONS') || PMPRO_USE_SESSIONS == true) {
if(defined('STDIN')) {
//command line
} else {
if (version_compare(phpversion(), '5.4.0', '>=')) {
if (session_status() == PHP_SESSION_NONE)
session_start();
} else {
if(!session_id())
session_start();
}
}
}
else
{
if (version_compare(phpversion(), '5.4.0', '>=')) {
if (session_status() == PHP_SESSION_NONE)
session_start();
}
else {
if(!session_id())
session_start();
}

}


/*
Includes
*/
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Not sure? You can find out by doing a bit a research.
* BUG: Fixed bug when using the testing gateway.
* BUG: Avoiding issues where is_user_logged in is not yet available for the pmpro_search_filter() function. (Thanks, d_enajetic)
* ENHANCEMENT: Updated Italian translation. (Thanks again, Angelo)
* ENHANCEMENT: You can now define('PMPRO_USE_SESSIONS', false); in your wp-config.php to force PMPro to skip the call to session_start. Note that PayPal Express and some addons require sessions to function.

= 1.8.12 =
* BUG: Fixed issue where "expiring soon" emails were sometimes sent more than needed.
Expand Down

0 comments on commit bae5e4e

Please sign in to comment.