Added missing get_cart_item

This commit is contained in:
Nicola Mustone 2014-11-18 20:48:45 +01:00
parent 5d30109ab6
commit 37ea3faf0a
1 changed files with 13 additions and 0 deletions

View File

@ -708,6 +708,19 @@ class WC_Cart {
return $cart_session;
}
/**
* Returns a specific itme in the cart
*
* @return array item data
*/
public function get_cart_item( $item_key ) {
if ( isset( $this->cart_contents[ $item_key ] ) ) {
return $this->cart_contents[ $item_key ];
}
return false;
}
/**
* Returns the cart and shipping taxes, merged.
*