@@ -15,6 +15,7 @@ trait WoocommerceTrait
15
15
*/
16
16
public function all ($ endpoint = '' , $ options = [])
17
17
{
18
+ self ::__construct ();
18
19
return $ this ->client ->get ($ endpoint , $ options );
19
20
}
20
21
@@ -29,6 +30,7 @@ public function all($endpoint = '', $options = [])
29
30
*/
30
31
public function find ($ endpoint = '' , $ options = [])
31
32
{
33
+ self ::__construct ();
32
34
return $ this ->client ->get ($ endpoint , $ options );
33
35
}
34
36
@@ -43,6 +45,7 @@ public function find($endpoint = '', $options = [])
43
45
*/
44
46
public function create ($ endpoint , $ data )
45
47
{
48
+ self ::__construct ();
46
49
return $ this ->client ->post ($ endpoint , $ data );
47
50
}
48
51
@@ -57,6 +60,7 @@ public function create($endpoint, $data)
57
60
*/
58
61
public function update ($ endpoint , $ data )
59
62
{
63
+ self ::__construct ();
60
64
return $ this ->client ->put ($ endpoint , $ data );
61
65
}
62
66
@@ -71,6 +75,7 @@ public function update($endpoint, $data)
71
75
*/
72
76
public function delete ($ endpoint , $ options = [])
73
77
{
78
+ self ::__construct ();
74
79
return $ this ->client ->delete ($ endpoint , $ options );
75
80
}
76
81
@@ -81,6 +86,7 @@ public function delete($endpoint, $options = [])
81
86
*/
82
87
public function getRequest ()
83
88
{
89
+ self ::__construct ();
84
90
return $ this ->client ->http ->getRequest ();
85
91
}
86
92
@@ -91,6 +97,7 @@ public function getRequest()
91
97
*/
92
98
public function getResponse ()
93
99
{
100
+ self ::__construct ();
94
101
return $ this ->client ->http ->getResponse ();
95
102
}
96
103
0 commit comments