WC_Discounts::filter_products_with_price()protectedWC 3.2.0

Filter out all products which have been fully discounted to 0. Used as array_filter callback.

Method of the class: WC_Discounts{}

No Hooks.

Return

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->filter_products_with_price( $item );
$item(object) (required)
Get data for this item.

Changelog

Since 3.2.0 Introduced.

WC_Discounts::filter_products_with_price() code WC 8.7.0

protected function filter_products_with_price( $item ) {
	return $this->get_discounted_price_in_cents( $item ) > 0;
}