WC_Cart_Totals::get_discounted_price_in_cents( object $item_key )
Get discounted price of an item with precision (in cents).
Description Description
Parameters Parameters
- $item_key
-
(Required) Item to get the price of.
Return Return
(int)
Source Source
File: includes/class-wc-cart-totals.php
protected function get_discounted_price_in_cents( $item_key ) {
$item = $this->items[ $item_key ];
$price = isset( $this->coupon_discount_totals[ $item_key ] ) ? $item->price - $this->coupon_discount_totals[ $item_key ] : $item->price;
return $price;
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.2.0 | Introduced. |