Skip to content

Commit 1d927b2

Browse files
tpenarandaLukeTowers
authored andcommitted
Fix for error when calling public method getCallsRemaining() (#2)
The X-Shopify-Shop-Api-Call-Limit header now returns an array with a single string element instead of just a string, this fixes that. Credit to @tpenaranda
1 parent 45217cd commit 1d927b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Shopify.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,6 @@ protected function getCallLimitHeaderValue()
291291
throw new Exception("Call limits can't be polled before a request has been made.");
292292
}
293293

294-
return explode('/', $this->last_response_headers['X-Shopify-Shop-Api-Call-Limit']);
294+
return explode('/', $this->last_response_headers['X-Shopify-Shop-Api-Call-Limit'][0]);
295295
}
296296
}

0 commit comments

Comments
 (0)