WC_Order_Item::has_cogs()
Indicates if the current order item has an associated Cost of Goods Sold value.
Derived classes representing line items that have a COGS value should override this method to return "true" and also the 'calculate_cogs_value_core' method.
Метод класса: WC_Order_Item{}
Хуков нет.
Возвращает
true|false
. True if this line item has an associated Cost of Goods Sold value.
Использование
$WC_Order_Item = new WC_Order_Item(); $WC_Order_Item->has_cogs(): bool;
Список изменений
С версии 9.5.0 | Введена. |
Код WC_Order_Item::has_cogs() WC Order Item::has cogs WC 9.6.1
public function has_cogs(): bool { return false; }