WC_Discounts::set_items()
Set items directly. Used by WC_Cart_Totals.
Метод класса: WC_Discounts{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Discounts = new WC_Discounts(); $WC_Discounts->set_items( $items );
- $items(массив) (обязательный)
- Items to set.
Список изменений
С версии 3.2.3 | Введена. |
Код WC_Discounts::set_items() WC Discounts::set items WC 8.7.0
public function set_items( $items ) { $this->items = $items; $this->discounts = array(); uasort( $this->items, array( $this, 'sort_by_price' ) ); }