You appear to be a bot. Output may be restricted
Description
Get the quantity of an item in the cart.
Usage
$int = EDD_Cart::get_item_quantity( $download_id, $options );
Parameters
- $download_id
- ( int ) optional – Download ID of the item
- $options
- ( array ) optional –
Returns
int Numerical index of the position of the item in the cart
Source
File name: easy-digital-downloads/includes/cart/class-edd-cart.php
Lines:
1 to 11 of 11
public function get_item_quantity( $download_id = 0, $options = array() ) { $key = $this->get_item_position( $download_id, $options ); $quantity = isset( $this->contents[ $key ]['quantity'] ) && edd_item_quantities_enabled() ? $this->contents[ $key ]['quantity'] : 1; if ( $quantity < 1 ) { $quantity = 1; } return absint( apply_filters( 'edd_get_cart_item_quantity', $quantity, $download_id, $options ) ); }