@@ -15,22 +15,22 @@ class Order extends BaseModel
1515 * Note
1616 */
1717
18- public function notes ($ order_id , $ options = [])
18+ protected function notes ($ order_id , $ options = [])
1919 {
2020 return WooCommerce::all ("orders/ {$ order_id }/notes " , $ options );
2121 }
2222
23- public function note ($ order_id , $ note_id )
23+ protected function note ($ order_id , $ note_id )
2424 {
25- return WooCommerce::create ("orders/ {$ order_id }/notes/ {$ note_id }" );
25+ return WooCommerce::find ("orders/ {$ order_id }/notes/ {$ note_id }" );
2626 }
2727
28- public function createNote ($ order_id )
28+ protected function createNote ($ order_id, $ data = [] )
2929 {
30- return WooCommerce::create ("orders/ {$ order_id }/notes " );
30+ return WooCommerce::create ("orders/ {$ order_id }/notes " , $ data );
3131 }
3232
33- public function deleteNote ($ order_id , $ note_id , $ options = [])
33+ protected function deleteNote ($ order_id , $ note_id , $ options = [])
3434 {
3535 return WooCommerce::delete ("orders/ {$ order_id }/notes/ {$ note_id }" , $ options );
3636 }
@@ -39,22 +39,22 @@ public function deleteNote($order_id, $note_id, $options = [])
3939 * Refund
4040 */
4141
42- public function refunds ($ order_id , $ options = [])
42+ protected function refunds ($ order_id , $ options = [])
4343 {
4444 return WooCommerce::all ("orders/ {$ order_id }/refunds " , $ options );
4545 }
4646
47- public function refund ($ order_id , $ refund_id )
47+ protected function refund ($ order_id , $ refund_id )
4848 {
49- return WooCommerce::create ("orders/ {$ order_id }/refunds/ {$ refund_id }" );
49+ return WooCommerce::find ("orders/ {$ order_id }/refunds/ {$ refund_id }" );
5050 }
5151
52- public function createRefund ($ order_id )
52+ protected function createRefund ($ order_id, $ data = [] )
5353 {
54- return WooCommerce::create ("orders/ {$ order_id }/refunds " );
54+ return WooCommerce::create ("orders/ {$ order_id }/refunds " , $ data );
5555 }
5656
57- public function deleteRefund ($ order_id , $ refund_id , $ options = [])
57+ protected function deleteRefund ($ order_id , $ refund_id , $ options = [])
5858 {
5959 return WooCommerce::delete ("orders/ {$ order_id }/refunds/ {$ refund_id }" , $ options );
6060 }
0 commit comments