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.


Top ↑

Return Return

(int)


Top ↑

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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.2.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.