![]() 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 NoteTrait { /** * Retrieve all Items. * * @param int $order_id * @param array $options * * @return array */ protected function all($order_id, $options = []) { return WooCommerce::all("orders/{$order_id}/notes", $options); } /** * Retrieve single Item. * * @param int $order_id * @param int $note_id * @param array $options * * @return object */ protected function find($order_id, $note_id, $options = []) { return WooCommerce::find("orders/{$order_id}/notes/{$note_id}", $options); } /** * Create new Item. * * @param int $order_id * @param array $data * * @return object */ protected function create($order_id, $data) { return WooCommerce::create("orders/{$order_id}/notes", $data); } /** * Destroy Item. * * @param int $order_id * @param int $note_id * @param array $options * * @return object */ protected function delete($order_id, $note_id, $options = []) { return WooCommerce::delete("orders/{$order_id}/notes/{$note_id}", $options); } }