WC_Abstract_Order::get_data()publicWC 3.0.0

Get all class data in array format.

Метод класса: WC_Abstract_Order{}

Хуков нет.

Возвращает

Массив.

Использование

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

Список изменений

С версии 3.0.0 Введена.

Код WC_Abstract_Order::get_data() WC 8.7.0

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