WC_Discounts::filter_products_with_price()
Filter out all products which have been fully discounted to 0. Used as array_filter callback.
Метод класса: WC_Discounts{}
Хуков нет.
Возвращает
true|false
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->filter_products_with_price( $item );
- $item(объект) (обязательный)
- Get data for this item.
Список изменений
С версии 3.2.0 | Введена. |
Код WC_Discounts::filter_products_with_price() WC Discounts::filter products with price WC 8.7.0
protected function filter_products_with_price( $item ) { return $this->get_discounted_price_in_cents( $item ) > 0; }