Automattic\WooCommerce\Internal\Admin\Orders

ListTable::render_shipping_address_column()publicWC 1.0

Renders order shipping information.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$ListTable = new ListTable();
$ListTable->render_shipping_address_column( $order ): void;
$order(WC_Order) (обязательный)
The order object for the current row.

Код ListTable::render_shipping_address_column() WC 9.3.3

public function render_shipping_address_column( WC_Order $order ): void {
	$address = $order->get_formatted_shipping_address();

	if ( $address ) {
		echo '<a target="_blank" href="' . esc_url( $order->get_shipping_address_map_url() ) . '">' . esc_html( preg_replace( '#<br\s*/?>#i', ', ', $address ) ) . '</a>';
		if ( $order->get_shipping_method() ) {
			/* translators: %s: shipping method */
			echo '<span class="description">' . sprintf( esc_html__( 'via %s', 'woocommerce' ), esc_html( $order->get_shipping_method() ) ) . '</span>';
		}
	} else {
		echo '&ndash;';
	}
}