Updates an order
@param integer $order_id
@param array $data
@return boolean
762390
public function update($order_id, array $data)
    {
        $result = null;
        $this->hook->attach('order.update.before', $order_id, $data, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $data['modified'] = GC_TIME;

        $this->prepareComponents($data);

        $result = (bool) $this->db->update('orders', $data, array('order_id' => $order_id));
        $this->hook->attach('order.update.after', $order_id, $data, $result, $this);
        return (bool) $result;
    }
1213176
private function addInvoice($order_id, $money = null)
    {
        $this->post['reference'] = $order_id;

        if ($money) {
            $this->post['amount'] = $this->amount($money);
        }

    }
213586
protected function applyOrderBy(array $data, $orderBy)
    {
        if (!empty($orderBy)) {
            ArrayHelper::multisort($data, array_keys($orderBy), array_values($orderBy));
        }

        return $data;
    }
797718
public function accountOrder($user_id, $order_id)
    {
        $this->setUserAccountOrder($user_id);
        $this->setOrderAccountOrder($order_id);
        $this->setTitleAccountOrder();
        $this->setBreadcrumbAccountOrder();

        $this->setData('user', $this->data_user);

        $this->setDataPanelSummaryAccountOrder();
        $this->setDataPanelComponentsAccountOrder();
        $this->setDataPanelPaymentAddressAccountOrder();
        $this->setDataPanelShippingAddressAccountOrder();

        $this->outputAccountOrder();
    }
1030488
public function trigger( $order_id ) {
		$order = wc_get_order( $order_id );
		if ( ! $order || ! $this->is_enabled() ) {
			return;
		}
		$reason = get_post_meta( $order->id, '_hametwoo_cancel_reason', true );
		if ( ! $reason ) {
			// Don't send with no reason.
			return;
		}
		$this->object = $order;
		$this->recipient = $this->object->billing_email;
		// Is html?
		foreach ( [
			'order_number' => $order->get_order_number(),
		    'order_date'   => date_i18n( get_option( 'date_format' ) ),
		] as $find => $result ) {
			$this->find[ $find ] = "{{$find}}";
			$this->replace[ $find ] = $result;
		}
		$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
	}
757503
public function updateStatus(Order $order, Request $request)
    {
        $order->status_id = $request->status_id;
        $order->save();

        return response()->json([
            'errors' => false,
            'message' => trans('core::core.messages.resource updated', ['name' => trans('order::orders.title.orders')]),
            'data' => $order,
        ]);
    }
534278
public function update($data, $_id = NULL)
    {

        if ($_id) {
            $this->_id = $_id;
        }

        $parameters = [
            "id" => $this->_id,
            "body" => ['doc' => $data],
            'client' => ['ignore' => $this->ignores]
        ];

        if ($index = $this->getIndex()) {
            $parameters["index"] = $index;
        }

        if ($type = $this->getType()) {
            $parameters["type"] = $type;
        }

        return (object)$this->connection->update($parameters);
    }
990520
public function update($module_id, array $data)
    {
        $data['modified'] = GC_TIME;
        $this->db->update('module', $data, array('module_id' => $module_id));
    }
473540
public function update(array $data, $id)
    {
        $scene = '';
        if (func_num_args() === 3) {
            $scene = func_get_arg(2);
        }

        $this->setOriginal($data);

        $this->setData($this->guardResult($data, $scene));

        if ($this->fireEvent('updating', $data) === false) {
            return false;
        }

        $model = is_numeric($id) ?
            $this->driver->updateByIntId($this->getData(), $id) :
            $this->driver->updateByStringId($this->getData(), $id);

        $this->fireEvent('updated', $model);

        return $model;
    }
920044
public function update($id, $data)
    {
        $sections = empty($data['sections']) ? [] : $data['sections'];

        return $this->_sendPayload(
            $this->_getService($this->_pageServiceKey)->updateTemplateSections($id, $sections)
        );
    }
676940
public function update(array $data, $id, $attribute = null)
    {
        $model = $this->find($id, ['*'], $attribute);

        if (empty($model)) return false;

        return $model->fill($data)->save();
    }
555385
public function update($id, array $data)
    {
        $todo = $this->client->put(
            sprintf('buckets/%d/todos/%d.json', $this->bucket, $id),
            [
                'json' => $data,
            ]
        );

        return new Todo($this->response($todo));
    }
1239496
public function update(Order $order)
    {
        if ($this->sgOrder->getUpdatePayment()) {
            $order->setIsPaid($this->sgOrder->getIsPaid());
        }

        if ($this->sgOrder->getUpdateShipping()) {
            $order->setIsShippingBlocked($this->sgOrder->getIsShippingBlocked());
        }
    }
29230
public function get($order_id)
    {
        $result = null;
        $this->hook->attach('order.get.before', $order_id, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $conditions = array(
            'limit' => array(0, 1),
            'order_id' => $order_id
        );

        $list = (array) $this->getList($conditions);
        $result = empty($list) ? array() : reset($list);

        $this->setCart($result);
        $this->hook->attach('order.get.after', $order_id, $result, $this);
        return $result;
    }
677508
protected function setNotificationUpdateOrder($order_id)
    {
        if (!$this->config('order_update_notify_customer', 1)) {
            return static::NOTIFICATION_DISABLED;
        }

        $order = $this->order->get($order_id);
        if ($this->order_action->notifyUpdated($order) === true) {
            return static::NOTIFICATION_SENT;
        }

        return static::NOTIFICATION_ERROR;
    }
1143575
public function setOrder($order_field, $order_type)
    {
        $this->orderField = $order_field;
        $this->orderType = $order_type;
        $this->queryBuilder->orderBy($order_field, $order_type);

        return $this;
    }
1111659
public function hasOrder($orderId)
    {
        $orderIdList = $this->session->get(self::SESSIONNAME, array());

        return true === in_array($orderId, $orderIdList);
    }