Skip to content

Commit

Permalink
Merge branch 'WP-82' into 'main'
Browse files Browse the repository at this point in the history
feat: entity-id header

See merge request ecommerce_modules/cms/wordpress/wordpress!32
  • Loading branch information
DEMAxx committed Oct 16, 2024
2 parents 016cdf9 + d32a1ab commit c32153a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CoreApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ public function syncShop(string $authIntToken): string
throw new ShopRegistrationException('[CDEKDelivery] Register shop failed', 'cdek_error.register.shop');
}

if (empty($response->data()['id'])) {
if (empty($response->getHeaders()['X-Entity-Id'])) {
throw new ShopRegistrationException(
'[CDEKDelivery] Failed to get shop uuid', 'cdek_error.uuid.auth', $response->data(),
);
}

return $response->data()['id'];
return $response->getHeaders()['X-Entity-Id'];
}

/**
Expand Down

0 comments on commit c32153a

Please sign in to comment.