Added missing get_cart_item
This commit is contained in:
parent
5d30109ab6
commit
37ea3faf0a
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue