public function restore_cart_item($cart_item_key)
{
if (isset($this->removed_cart_contents[$cart_item_key])) {
$this->cart_contents[$cart_item_key] = $this->removed_cart_contents[$cart_item_key];
$this->cart_contents[$cart_item_key]['data'] = wc_get_product($this->cart_contents[$cart_item_key]['variation_id'] ? $this->cart_contents[$cart_item_key]['variation_id'] : $this->cart_contents[$cart_item_key]['product_id']);
do_action('woocommerce_restore_cart_item', $cart_item_key, $this);
unset($this->removed_cart_contents[$cart_item_key]);
do_action('woocommerce_cart_item_restored', $cart_item_key, $this);
$this->calculate_totals();
return true;
}
return false;
}