PluginProbe
seQura / 4.0.0
seQura v4.0.0
4.3.4 4.3.3 4.3.2 4.3.1 trunk 2.0.0 2.0.10 2.0.11 2.0.12 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 3.0.0 3.0.2 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 4.0.0 All 30 releases
sequra / src / Services / Order / class-current-order-provider.php

class-current-order-provider.php in seQura 4.0.0, at src/Services/Order/class-current-order-provider.php

43 lines 749 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Current Order Provider Interface
4 *
5 * @package SeQura/WC
6 * @subpackage SeQura/WC/Services
7 */
8
9 namespace SeQura\WC\Services\Order;
10
11 use WC_Order;
12
13 /**
14 * Store and provide the current order data
15 */
16 class Current_Order_Provider implements Interface_Current_Order_Provider {
17
18 /**
19 * The current order
20 *
21 * @var WC_Order|null
22 */
23 private $order = null;
24
25 /**
26 * Set the current order
27 *
28 * @param WC_Order|null $order The order to set, or null to clear the current order
29 */
30 public function set( ?WC_Order $order ) {
31 $this->order = $order;
32 }
33
34 /**
35 * Get the current order
36 *
37 * @return WC_Order|null The current order, or null if none is set
38 */
39 public function get(): ?WC_Order {
40 return $this->order;
41 }
42 }
43