Skip to content

Commit 76ba098

Browse files
committed
Fix request params for DELETE calls
1 parent e85c310 commit 76ba098

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/woocommerce-api/class-wc-api-client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public function validate_api_url() {
247247
* @return object|array object by default
248248
* @throws WC_API_Client_Exception HTTP or authentication errors
249249
*/
250-
public function make_api_call( $method, $path, $request_data) {
250+
public function make_api_call( $method, $path, $request_data ) {
251251

252252
$args = array(
253253
'method' => $method,

lib/woocommerce-api/resources/abstract-wc-api-client-resource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ protected function get_endpoint_path() {
107107
*/
108108
protected function get_request_data() {
109109

110-
return 'GET' == $this->request_method ? $this->request_params : $this->request_body;
110+
return ( 'GET' === $this->request_method || 'DELETE' === $this->request_method ) ? $this->request_params : $this->request_body;
111111
}
112112

113113

0 commit comments

Comments
 (0)