Commit 8ae771f3 authored by haystack's avatar haystack

Do not start session when running under WP-CLI

parent fd6ba3ea
......@@ -301,7 +301,8 @@ class CiviCRM_For_WordPress {
$this->civicrm_in_wordpress_set();
// there is no session handling in WP hence we start it for CiviCRM pages
if (!session_id()) {
// except when running via WP-CLI which does not require sessions
if ( empty( session_id() ) && ! ( defined( 'WP_CLI' ) && WP_CLI ) ) {
session_start();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment