Merge pull request #18252 from shivapoudel/frontend-session

Only load session handler class on frontend not during cron
This commit is contained in:
Mike Jolley 2018-01-03 11:19:23 +00:00 committed by GitHub
commit 800b4feba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -378,10 +378,6 @@ final class WooCommerce {
$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' );
}
@ -444,6 +440,7 @@ final class WooCommerce {
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.
}
/**