![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/job-board.corals.io/Corals/modules/Woo/Integration/WooCommerce/Traits/ |
<?php namespace Corals\Modules\Woo\Integration\WooCommerce\Traits; use Corals\Modules\Woo\Integration\WooCommerce\Facades\WooCommerce; trait OrderTrait { /* * Note */ protected function notes($order_id, $options = []) { return WooCommerce::all("orders/{$order_id}/notes", $options); } protected function note($order_id, $note_id) { return WooCommerce::find("orders/{$order_id}/notes/{$note_id}"); } protected function createNote($order_id, $data = []) { return WooCommerce::create("orders/{$order_id}/notes", $data); } protected function deleteNote($order_id, $note_id, $options = []) { return WooCommerce::delete("orders/{$order_id}/notes/{$note_id}", $options); } /* * Refund */ protected function refunds($order_id, $options = []) { return WooCommerce::all("orders/{$order_id}/refunds", $options); } protected function refund($order_id, $refund_id) { return WooCommerce::find("orders/{$order_id}/refunds/{$refund_id}"); } protected function createRefund($order_id, $data = []) { return WooCommerce::create("orders/{$order_id}/refunds", $data); } protected function deleteRefund($order_id, $refund_id, $options = []) { return WooCommerce::delete("orders/{$order_id}/refunds/{$refund_id}", $options); } }