This class should NOT be instantiated, but the get_order function or new WC_Order_Factory.
should be used. It is possible, but the aforementioned are preferred and are the only.
methods that will be maintained going forward.
public __construct ( integer | object | WC_Order $order ) | ||
$order | integer | object | WC_Order | Order to read. |
/** * Extend the abstract _data properties and then read the order object. * * @param int|object|WC_Order $order Order to init. */ public function __construct($order = 0) { $this->_data = array_merge($this->_data, array('customer_id' => 0, 'order_key' => '', 'billing' => array('first_name' => '', 'last_name' => '', 'company' => '', 'address_1' => '', 'address_2' => '', 'city' => '', 'state' => '', 'postcode' => '', 'country' => '', 'email' => '', 'phone' => ''), 'shipping' => array('first_name' => '', 'last_name' => '', 'company' => '', 'address_1' => '', 'address_2' => '', 'city' => '', 'state' => '', 'postcode' => '', 'country' => ''), 'payment_method' => '', 'payment_method_title' => '', 'transaction_id' => '', 'customer_ip_address' => '', 'customer_user_agent' => '', 'created_via' => '', 'customer_note' => '', 'date_completed' => '', 'date_paid' => '', 'cart_hash' => '')); parent::__construct($order); }
/** * Extend the abstract _data properties and then read the order object. * * @param int|object|WC_Order $read Order to init. */ public function __construct($read = 0) { $this->data = array_merge($this->data, $this->extra_data); parent::__construct($read); }
/** * Extend the abstract _data properties and then read the order object. * @param int|object|WC_Order $read Order to init. */ public function __construct($read = 0) { // Extend order data $this->_data = array_merge($this->_data, array('amount' => '', 'reason' => '', 'refunded_by' => 0)); parent::__construct($read); }
/** * Initialize the order refund. * * @param int|WC_Order $order */ public function __construct($order) { $this->order_type = 'simple'; parent::__construct($order); }
/** * Extend the abstract _data properties and then read the order object. * * @param int|object|WC_Order $order Order to init. */ public function __construct($order = 0) { $this->_data = array_merge($this->_data, array('amount' => '', 'reason' => '', 'refunded_by' => 0)); parent::__construct($order); }