From 0ec0ca29a21aef2fb3f5c2d3fcc30df0071c3b34 Mon Sep 17 00:00:00 2001 From: Shiva Poudel Date: Thu, 21 Dec 2017 10:16:13 +0545 Subject: [PATCH] Only load session handler class on frontend not during cron Ref: #18193 CC @mikejolley --- includes/class-woocommerce.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/class-woocommerce.php b/includes/class-woocommerce.php index e9832d4de29..57c2fffa3ff 100644 --- a/includes/class-woocommerce.php +++ b/includes/class-woocommerce.php @@ -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. } /**