Skip to content

Commit

Permalink
Only load session handler class on frontend not during cron
Browse files Browse the repository at this point in the history
  • Loading branch information
Shiva Poudel committed Dec 21, 2017
1 parent 59ccb00 commit 0ec0ca2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions includes/class-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,6 @@ public function includes() {
$this->frontend_includes();
}

if ( $this->is_request( 'frontend' ) || $this->is_request( 'cron' ) ) {
include_once( WC_ABSPATH . 'includes/class-wc-session-handler.php' );
}

if ( $this->is_request( 'cron' ) && 'yes' === get_option( 'woocommerce_allow_tracking', 'no' ) ) {
include_once( WC_ABSPATH . 'includes/class-wc-tracker.php' );
}
Expand Down Expand Up @@ -444,6 +440,7 @@ public function frontend_includes() {
include_once( WC_ABSPATH . 'includes/class-wc-shortcodes.php' ); // Shortcodes class.
include_once( WC_ABSPATH . 'includes/class-wc-embed.php' ); // Embeds.
include_once( WC_ABSPATH . 'includes/class-wc-structured-data.php' ); // Structured Data class.
include_once( WC_ABSPATH . 'includes/class-wc-session-handler.php' ); // Session handler class.
}

/**
Expand Down

0 comments on commit 0ec0ca2

Please sign in to comment.