Skip to content

Commit 4270ddf

Browse files
committed
Update with SSL fix for servers that are dropping auth - see: kloon#29
1 parent 9249148 commit 4270ddf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/WC/API/Client.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class WC_API_Client
1818
*/
1919
const HASH_ALGORITHM = 'SHA256';
2020

21-
const VERSION = '0.3.3';
21+
const VERSION = '0.3.4';
2222
/**
2323
* The API URL
2424
*
@@ -448,6 +448,10 @@ private function _make_api_call( $endpoint, $data = array(), $method = 'GET' )
448448
// Check if we must use Basic Auth or 1 legged oAuth, if SSL we use basic, if not we use OAuth 1.0a one-legged
449449
if ($this->_is_ssl) {
450450
curl_setopt( $ch, CURLOPT_USERPWD, $this->_consumer_key . ":" . $this->_consumer_secret );
451+
452+
// Adding auth details to get param string due to issues with some web servers dropping auth token above
453+
$params['consumer_key'] = $this->_consumer_key;
454+
$params['consumer_secret'] = $this->_consumer_secret;
451455
} else {
452456
$params['oauth_consumer_key'] = $this->_consumer_key;
453457
$params['oauth_timestamp'] = time();

0 commit comments

Comments
 (0)