WC_Order::get_data()publicWC 3.0.0

Get all class data in array format.

Method of the class: WC_Order{}

No Hooks.

Return

Array.

Usage

$WC_Order = new WC_Order();
$WC_Order->get_data();

Changelog

Since 3.0.0 Introduced.

WC_Order::get_data() code WC 9.4.2

public function get_data() {
	return array_merge(
		$this->get_base_data(),
		array(
			'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' ),
		)
	);
}