Skip to content

Commit

Permalink
Merge pull request #5 from kedodrill/fixGetProduct
Browse files Browse the repository at this point in the history
Fix Get Product
  • Loading branch information
brandon14 committed Apr 2, 2019
2 parents 3b5c2a6 + 18d7af8 commit 70afe9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Products/GetProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public function sendRequest(
$apiHeaders['query']['skus'] = $skuArr;
}

if (isset($apiHeaders['query'])) {
$apiHeaders['query'] = http_build_query($apiHeaders['query']);
$apiHeaders['query'] = preg_replace('/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', $apiHeaders['query']);
}

// Send the HTTP request to the API endpoint and get the response stream
$response = $this->httpClient->request('GET', $url, $apiHeaders);

Expand Down

0 comments on commit 70afe9b

Please sign in to comment.