Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableDataStore::get_stock_reduced()publicWC 1.0

Gets information about whether stock was reduced.

Метод класса: OrdersTableDataStore{}

Хуков нет.

Возвращает

true|false. Whether stock was reduced.

Использование

$OrdersTableDataStore = new OrdersTableDataStore();
$OrdersTableDataStore->get_stock_reduced( $order );
$order(\WC_Order) (обязательный)
Order object.

Код OrdersTableDataStore::get_stock_reduced() WC 7.3.0

public function get_stock_reduced( $order ) {
	$order = is_int( $order ) ? wc_get_order( $order ) : $order;
	return $order->get_order_stock_reduced();
}