protected function setPriceRules(array $order)
    {
        foreach (array_keys($order['data']['components']) as $component_id) {
            if (is_numeric($component_id)) {
                $rule = $this->price_rule->get($component_id);
                if (isset($rule['code']) && $rule['code'] !== '') {
                    $this->price_rule->setUsed($rule['price_rule_id']);
                }
            }
        }
    }