From 2e27ea3108874b1a4e00004ece1f1bd5caaf2c5a Mon Sep 17 00:00:00 2001 From: Geert De Deckere Date: Tue, 20 Mar 2012 14:50:19 +0100 Subject: [PATCH] Call WC_Cart->init() method directly from within the init hook --- classes/class-wc-cart.php | 2 -- woocommerce.php | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/classes/class-wc-cart.php b/classes/class-wc-cart.php index 81210fc64b0..4b9dc2d9a12 100644 --- a/classes/class-wc-cart.php +++ b/classes/class-wc-cart.php @@ -44,8 +44,6 @@ class WC_Cart { $this->prices_include_tax = (get_option('woocommerce_prices_include_tax')=='yes') ? true : false; $this->display_totals_ex_tax = (get_option('woocommerce_display_totals_excluding_tax')=='yes') ? true : false; $this->display_cart_ex_tax = (get_option('woocommerce_display_cart_prices_excluding_tax')=='yes') ? true : false; - - add_action('init', array(&$this, 'init'), 5); // Get cart on init } /** diff --git a/woocommerce.php b/woocommerce.php index fa66ebef13e..d6911be954c 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -265,6 +265,7 @@ class Woocommerce { // Class instances $this->cart = new WC_Cart(); // Cart class, stores the cart contents + $this->cart->init(); $this->customer = new WC_Customer(); // Customer class, sorts out session data such as location $this->query = new WC_Query(); // Query class, handles front-end queries and loops