WC_Discounts::filter_products_with_price()
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() WC Discounts::filter products with price code WC 9.8.2
protected function filter_products_with_price( $item ) { return $this->get_discounted_price_in_cents( $item ) > 0; }