@@ -15,6 +15,7 @@ trait WoocommerceTrait
1515 */
1616 public function all ($ endpoint = '' , $ options = [])
1717 {
18+ self ::__construct ();
1819 return $ this ->client ->get ($ endpoint , $ options );
1920 }
2021
@@ -29,6 +30,7 @@ public function all($endpoint = '', $options = [])
2930 */
3031 public function find ($ endpoint = '' , $ options = [])
3132 {
33+ self ::__construct ();
3234 return $ this ->client ->get ($ endpoint , $ options );
3335 }
3436
@@ -43,6 +45,7 @@ public function find($endpoint = '', $options = [])
4345 */
4446 public function create ($ endpoint , $ data )
4547 {
48+ self ::__construct ();
4649 return $ this ->client ->post ($ endpoint , $ data );
4750 }
4851
@@ -57,6 +60,7 @@ public function create($endpoint, $data)
5760 */
5861 public function update ($ endpoint , $ data )
5962 {
63+ self ::__construct ();
6064 return $ this ->client ->put ($ endpoint , $ data );
6165 }
6266
@@ -71,6 +75,7 @@ public function update($endpoint, $data)
7175 */
7276 public function delete ($ endpoint , $ options = [])
7377 {
78+ self ::__construct ();
7479 return $ this ->client ->delete ($ endpoint , $ options );
7580 }
7681
@@ -81,6 +86,7 @@ public function delete($endpoint, $options = [])
8186 */
8287 public function getRequest ()
8388 {
89+ self ::__construct ();
8490 return $ this ->client ->http ->getRequest ();
8591 }
8692
@@ -91,6 +97,7 @@ public function getRequest()
9197 */
9298 public function getResponse ()
9399 {
100+ self ::__construct ();
94101 return $ this ->client ->http ->getResponse ();
95102 }
96103
0 commit comments