Automattic\WooCommerce\Internal\Admin\Orders\MetaBoxes

CustomerHistory::outputpublicWC 1.0

Output the customer history template for the order.

Method of the class: CustomerHistory{}

No Hooks.

Returns

null. Nothing (null).

Usage

$CustomerHistory = new CustomerHistory();
$CustomerHistory->output( $order ): void;
$order(WC_Order) (required)
The order object.

CustomerHistory::output() code WC 10.8.1

public function output( WC_Order $order ): void {
	// No history when adding a new order.
	if ( 'auto-draft' === $order->get_status() ) {
		return;
	}

	$customer_history = $this->get_customer_history( $order );

	wc_get_template( 'order/customer-history.php', $customer_history );
}