File tree Expand file tree Collapse file tree 3 files changed +53
-1
lines changed Expand file tree Collapse file tree 3 files changed +53
-1
lines changed Original file line number Diff line number Diff line change 43
43
"Report" : " Codexshaper\\ WooCommerce\\ Models\\ Report" ,
44
44
"Review" : " Codexshaper\\ WooCommerce\\ Models\\ Review" ,
45
45
"Setting" : " Codexshaper\\ WooCommerce\\ Models\\ Setting" ,
46
- "ShippingMethod" : " Codexshaper\\ WooCommerce\\ Models\\ ShippingMethod" ,
47
46
"ShippingZone" : " Codexshaper\\ WooCommerce\\ Models\\ ShippingZone" ,
47
+ "ShippingZoneMethod" : " Codexshaper\\ WooCommerce\\ Models\\ ShippingZoneMethod" ,
48
48
"System" : " Codexshaper\\ WooCommerce\\ Models\\ System" ,
49
49
"Tag" : " Codexshaper\\ WooCommerce\\ Models\\ Tag" ,
50
50
"Tax" : " Codexshaper\\ WooCommerce\\ Models\\ Tax" ,
Original file line number Diff line number Diff line change
1
+ <?php
2
+ namespace Codexshaper \WooCommerce \Facades ;
3
+
4
+ use Illuminate \Support \Facades \Facade ;
5
+
6
+ class ShippingZoneMethod extends Facade
7
+ {
8
+ /**
9
+ * Get the registered name of the component.
10
+ *
11
+ * @return string
12
+ */
13
+ protected static function getFacadeAccessor ()
14
+ {
15
+ return 'Codexshaper\WooCommerce\Models\ShippingZoneMethod ' ;
16
+ }
17
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Codexshaper \WooCommerce \Models ;
4
+
5
+ use Codexshaper \WooCommerce \Facades \WooCommerce ;
6
+
7
+ class ShippingZoneMethod extends BaseModel
8
+ {
9
+ protected $ endpoint = 'shipping_methods ' ;
10
+
11
+ /**
12
+ * Retrieve all Items
13
+ *
14
+ * @param array $options
15
+ *
16
+ * @return array
17
+ */
18
+ protected function all ($ options = [])
19
+ {
20
+ return WooCommerce::all ($ this ->endpoint , $ options );
21
+ }
22
+
23
+ /**
24
+ * Retrieve single Item
25
+ *
26
+ * @param integer $id
27
+ * @param array $options
28
+ *
29
+ * @return object
30
+ */
31
+ protected function find ($ id , $ options = [])
32
+ {
33
+ return collect (WooCommerce::find ("{$ this ->endpoint }/ {$ id }" , $ options ));
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments