Skip to content

Commit

Permalink
Fixed a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiosanches committed Jan 14, 2015
1 parent 3228fc0 commit 11150a5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions includes/class-wc-cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class WC_Cart {
public $cart_contents = array();

/** @var array Contains an array of removed cart items. */
public $removed_card_contents = array();
public $removed_cart_contents = array();

/** @var array Contains an array of coupon codes applied to the cart. */
public $applied_coupons = array();
Expand Down Expand Up @@ -997,7 +997,7 @@ public function add_to_cart( $product_id, $quantity = 1, $variation_id = '', $va
public function remove_cart_item( $cart_item_key ) {
if ( isset( $this->cart_contents[ $cart_item_key ] ) ) {
$remove = $this->cart_contents[ $cart_item_key ];
$this->removed_card_contents[ $cart_item_key ] = $remove;
$this->removed_cart_contents[ $cart_item_key ] = $remove;

unset( $this->cart_contents[ $cart_item_key ] );

Expand All @@ -1010,11 +1010,11 @@ public function remove_cart_item( $cart_item_key ) {
}

public function restore_cart_item( $cart_item_key ) {
if ( isset( $this->removed_card_contents[ $cart_item_key ] ) ) {
$restore = $this->removed_card_contents[ $cart_item_key ];
if ( isset( $this->removed_cart_contents[ $cart_item_key ] ) ) {
$restore = $this->removed_cart_contents[ $cart_item_key ];
$this->cart_contents[ $cart_item_key ] = $restore;

unset( $this->removed_card_contents[ $cart_item_key ] );
unset( $this->removed_cart_contents[ $cart_item_key ] );

$this->calculate_totals();

Expand Down

0 comments on commit 11150a5

Please sign in to comment.