WC_Order::get_data PHP Method

get_data() public method

Get all class data in array format.
Since: 2.7.0
public get_data ( ) : array
return array
    public function get_data()
    {
        return array_merge($this->data, array('number' => $this->get_order_number(), 'meta_data' => $this->get_meta_data(), 'line_items' => $this->get_items('line_item'), 'tax_lines' => $this->get_items('tax'), 'shipping_lines' => $this->get_items('shipping'), 'fee_lines' => $this->get_items('fee'), 'coupon_lines' => $this->get_items('coupon')));
    }

Usage Example

Beispiel #1
0
 /**
  * Test: get_data
  */
 function test_get_data()
 {
     $object = new WC_Order();
     $this->assertInternalType('array', $object->get_data());
 }
WC_Order