WordPress at Your Fingertips
function is not described

WC_Discounts::get_discounted_price_in_cents() public WC 3.2.0

Get discounted price of an item to precision (in cents).

{} It's a method of the class: WC_Discounts{}

No Hooks.

Return

Int.

Usage

$WC_Discounts = new WC_Discounts();
$WC_Discounts->get_discounted_price_in_cents( $item );
$item(object) (required)
Get data for this item.

Changelog

Since 3.2.0 Introduced.

Code of WC_Discounts::get_discounted_price_in_cents() WC 5.6.0

public function get_discounted_price_in_cents( $item ) {
	return absint( NumberUtil::round( $item->price - $this->get_discount( $item->key, true ) ) );
}