Mage2\Order\Controllers\OrderController::syncOrderProductData PHP Метод

syncOrderProductData() публичный Метод

public syncOrderProductData ( $order, $orderProducts )
    public function syncOrderProductData($order, $orderProducts)
    {
        //Only use pivot fields only @latner on use Collection and then use pluck method rather then foreach
        foreach ($orderProducts as $i => $orderProduct) {
            unset($orderProduct['model']);
            unset($orderProduct['id']);
            $orderProducts[$i] = $orderProduct;
        }
        $order->products()->sync($orderProducts);
    }