WordPress at Your Fingertips
function is not described

WC_Discounts::filter_products_with_price() protected WC 3.2.0

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

{} It's a 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.

Code of WC_Discounts::filter_products_with_price() WC 5.6.0

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