EDD_Cart
EDD_Cart Class
Description Description
Source Source
File: includes/cart/class-edd-cart.php
Changelog Changelog
Version | Description |
---|---|
2.7 | Introduced. |
Methods Methods
- __construct — Constructor.
- add — Add to cart
- display_cart_discount — Shows the fully formatted cart discount
- empty_cart — Empty the cart
- generate_token — Generate URL token to restore the cart via a URL
- get_all_fees — Get All Cart Fees.
- get_contents — Get cart contents
- get_contents_details — Get cart contents details
- get_contents_from_session — Populate the cart with the data stored in the session
- get_discountable_subtotal — Get Discountable Subtotal.
- get_discounted_amount — Get Discounted Amount.
- get_discounts — Get Discounts.
- get_discounts_from_session — Populate the discounts with the data stored in the session.
- get_fees — Get Cart Fees
- get_item_discount_amount — Get the discounted amount on a price
- get_item_final_price — Final Price of Item in Cart (incl. discounts and taxes)
- get_item_name — Get the name of an item in the cart.
- get_item_position — Get the position of an item in the cart
- get_item_price — Gets the price of the cart item. Always exclusive of taxes.
- get_item_price_id — Get the price ID for an item in the cart.
- get_item_price_name — Get the price name for an item in the cart.
- get_item_quantity — Get the quantity of an item in the cart.
- get_item_tax — Calculate the tax for an item in the cart.
- get_items_subtotal — Get Cart Items Subtotal.
- get_quantity — Get quantity
- get_subtotal — Get Cart Subtotal.
- get_tax — Get all applicable tax for the items in the cart
- get_tax_on_fees — Get tax applicable for fees.
- get_token — Retrieve a saved cart token. Used in validating saved carts
- get_total — Get Total Cart Amount.
- get_total_fees — Get Cart Fee Total
- has_discounts — Checks if any discounts have been applied to the cart
- is_empty — Checks if the cart is empty
- is_item_in_cart — Checks to see if an item is in the cart.
- is_saved — Checks if the cart has been saved
- is_saving_enabled — Is Cart Saving Enabled?
- item_price — Cart Item Price.
- remove — Remove from cart
- remove_all_discounts — Remove all discount codes
- remove_discount — Remove discount from the cart
- remove_fee_url — Generate the URL to remove a fee from the cart.
- remove_item_url — Generate the URL to remove an item from the cart.
- restore — Restore Cart
- save — Save Cart
- set_item_quantity — Set the quantity of an item in the cart.
- setup_cart — Sets up cart components
- subtotal — Subtotal (before taxes).
- tax — Gets the total tax amount for the cart contents in a fully formatted way
- total — Fully Formatted Total Cart Amount.
- update_cart — Update Cart