@@ -96,16 +96,6 @@ abstract class ShopifyResource
9696 protected $ customPutActions = array ();
9797 protected $ customDeleteActions = array ();
9898
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-
10999 /**
110100 * The ID of the resource
111101 *
@@ -235,7 +225,7 @@ public function __call($name, $arguments)
235225
236226 $ url = $ this ->generateUrl ($ urlParams , $ customAction );
237227
238- return $ this ->$ httpMethod ($ dataArray , $ url, ! in_array ( $ name , $ this -> customPostActionsNoWrap ) );
228+ return $ this ->$ httpMethod ($ dataArray , $ url );
239229 }
240230 }
241231
@@ -365,22 +355,18 @@ public function search($query)
365355 /**
366356 * Call POST method to create a new resource
367357 *
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
369359 * @param string $url
370360 *
371- * @param bool $wrapBody
372- *
373- * @return array
374- * @throws ApiException
375- * @throws CurlException
376361 * @uses HttpRequestJson::post() to send the HTTP request
377362 *
363+ * @return array
378364 */
379- public function post ($ dataArray , $ url = null , $ wrapBody = true )
365+ public function post ($ dataArray , $ url = null )
380366 {
381367 if (!$ url ) $ url = $ this ->generateUrl ();
382368
383- if ($ wrapBody && !empty ($ dataArray )) $ dataArray = $ this ->wrapData ($ dataArray );
369+ if (!empty ($ dataArray )) $ dataArray = $ this ->wrapData ($ dataArray );
384370
385371 $ response = HttpRequestJson::post ($ url , $ dataArray , $ this ->httpHeaders );
386372
0 commit comments