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 8.7.0

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