WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Admin_List_Table_Orders::order_preview_get_order_details() public WC 1.0

Get order details to send to the ajax endpoint for previews.

Это метод класса: WC_Admin_List_Table_Orders{}

Возвращает

Массив.

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

$result = WC_Admin_List_Table_Orders::order_preview_get_order_details( $order );
$order(WC_Order) (обязательный)
Order object.

Код WC_Admin_List_Table_Orders::order_preview_get_order_details() WC 4.5.2

woocommerce/includes/admin/list-tables/class-wc-admin-list-table-orders.php
<?php
public static function order_preview_get_order_details( $order ) {
	if ( ! $order ) {
		return array();
	}

	$payment_via      = $order->get_payment_method_title();
	$payment_method   = $order->get_payment_method();
	$payment_gateways = WC()->payment_gateways() ? WC()->payment_gateways->payment_gateways() : array();
	$transaction_id   = $order->get_transaction_id();

	if ( $transaction_id ) {

		$url = isset( $payment_gateways[ $payment_method ] ) ? $payment_gateways[ $payment_method ]->get_transaction_url( $order ) : false;

		if ( $url ) {
			$payment_via .= ' (<a href="' . esc_url( $url ) . '" target="_blank">' . esc_html( $transaction_id ) . '</a>)';
		} else {
			$payment_via .= ' (' . esc_html( $transaction_id ) . ')';
		}
	}

	$billing_address  = $order->get_formatted_billing_address();
	$shipping_address = $order->get_formatted_shipping_address();

	return apply_filters(
		'woocommerce_admin_order_preview_get_order_details',
		array(
			'data'                       => $order->get_data(),
			'order_number'               => $order->get_order_number(),
			'item_html'                  => self::get_order_preview_item_html( $order ),
			'actions_html'               => self::get_order_preview_actions_html( $order ),
			'ship_to_billing'            => wc_ship_to_billing_address_only(),
			'needs_shipping'             => $order->needs_shipping_address(),
			'formatted_billing_address'  => $billing_address ? $billing_address : __( 'N/A', 'woocommerce' ),
			'formatted_shipping_address' => $shipping_address ? $shipping_address : __( 'N/A', 'woocommerce' ),
			'shipping_address_map_url'   => $order->get_shipping_address_map_url(),
			'payment_via'                => $payment_via,
			'shipping_via'               => $order->get_shipping_method(),
			'status'                     => $order->get_status(),
			'status_name'                => wc_get_order_status_name( $order->get_status() ),
		),
		$order
	);
}