store less crap in the sessions
This commit is contained in:
parent
ed9d57d04a
commit
7a0167d494
|
@ -139,7 +139,17 @@ class WC_Cart {
|
||||||
$this->calculate_totals();
|
$this->calculate_totals();
|
||||||
|
|
||||||
// Set cart and coupon session data
|
// Set cart and coupon session data
|
||||||
$_SESSION['cart'] = $this->cart_contents;
|
$cart_session = array();
|
||||||
|
|
||||||
|
if ($this->cart_contents) foreach ($this->cart_contents as $key => $values) {
|
||||||
|
|
||||||
|
$cart_session[$key] = $values;
|
||||||
|
|
||||||
|
// Unset product object
|
||||||
|
unset($cart_session[$key]['data']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$_SESSION['cart'] = $cart_session;
|
||||||
$_SESSION['coupons'] = $this->applied_coupons;
|
$_SESSION['coupons'] = $this->applied_coupons;
|
||||||
|
|
||||||
// Store totals to avoid re-calc on page load
|
// Store totals to avoid re-calc on page load
|
||||||
|
|
|
@ -162,6 +162,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
||||||
* Hooks for locate template functions (Thanks Lucas)
|
* Hooks for locate template functions (Thanks Lucas)
|
||||||
* Better language loading (GeertDD and deckerweb #win)
|
* Better language loading (GeertDD and deckerweb #win)
|
||||||
* Fix for grouped product from price
|
* Fix for grouped product from price
|
||||||
|
* Store less cart data in sessions to reduce file sizes
|
||||||
|
|
||||||
= 1.5 - 01/03/2012 =
|
= 1.5 - 01/03/2012 =
|
||||||
* Quick edit products
|
* Quick edit products
|
||||||
|
|
Loading…
Reference in New Issue