Automattic\WooCommerce\Internal\Admin\Orders\MetaBoxes
CustomerHistory::output()
Output the customer history template for the order.
Метод класса: CustomerHistory{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$CustomerHistory = new CustomerHistory(); $CustomerHistory->output( $order ): void;
- $order(WC_Order) (обязательный)
- The order object.
Код CustomerHistory::output() CustomerHistory::output WC 9.5.1
public function output( WC_Order $order ): void { // No history when adding a new order. if ( 'auto-draft' === $order->get_status() ) { return; } $customer_history = null; if ( method_exists( $order, 'get_report_customer_id' ) ) { $customer_history = $this->get_customer_history( $order->get_report_customer_id() ); } if ( ! $customer_history ) { $customer_history = array( 'orders_count' => 0, 'total_spend' => 0, 'avg_order_value' => 0, ); } wc_get_template( 'order/customer-history.php', $customer_history ); }