Call WC_Cart->init() method directly from within the init hook
This commit is contained in:
parent
7a510c55ac
commit
2e27ea3108
|
@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue