@@ -96,16 +96,6 @@ abstract class ShopifyResource
96
96
protected $ customPutActions = array ();
97
97
protected $ customDeleteActions = array ();
98
98
99
- /**
100
- * Some actions from inventory levels do not wrap the content of the request
101
- *
102
- * Wrapping such request body leads to errors. This list is used to disable this wrapping
103
- * on certain methods.
104
- *
105
- * @var array
106
- */
107
- protected $ customPostActionsNoWrap = array ();
108
-
109
99
/**
110
100
* The ID of the resource
111
101
*
@@ -235,7 +225,7 @@ public function __call($name, $arguments)
235
225
236
226
$ url = $ this ->generateUrl ($ urlParams , $ customAction );
237
227
238
- return $ this ->$ httpMethod ($ dataArray , $ url, ! in_array ( $ name , $ this -> customPostActionsNoWrap ) );
228
+ return $ this ->$ httpMethod ($ dataArray , $ url );
239
229
}
240
230
}
241
231
@@ -365,22 +355,18 @@ public function search($query)
365
355
/**
366
356
* Call POST method to create a new resource
367
357
*
368
- * @param array $dataArray Check Shopify API reference of the specific resource for the list of required and optional data elements to be provided
358
+ * @param array $dataArray Check Shopify API reference of the specific resource for the list of required and optional data elements to be provided
369
359
* @param string $url
370
360
*
371
- * @param bool $wrapBody
372
- *
373
- * @return array
374
- * @throws ApiException
375
- * @throws CurlException
376
361
* @uses HttpRequestJson::post() to send the HTTP request
377
362
*
363
+ * @return array
378
364
*/
379
- public function post ($ dataArray , $ url = null , $ wrapBody = true )
365
+ public function post ($ dataArray , $ url = null )
380
366
{
381
367
if (!$ url ) $ url = $ this ->generateUrl ();
382
368
383
- if ($ wrapBody && !empty ($ dataArray )) $ dataArray = $ this ->wrapData ($ dataArray );
369
+ if (!empty ($ dataArray )) $ dataArray = $ this ->wrapData ($ dataArray );
384
370
385
371
$ response = HttpRequestJson::post ($ url , $ dataArray , $ this ->httpHeaders );
386
372
0 commit comments