Skip to content
Docs
Get RestroPress

Filter

rpress_admin_receipt_delivery_address

Updated
On this page

Filters the delivery address text shown on the admin order details screen.

Applied to the comma-separated delivery address (address, flat, city and postcode) built from the order's _rpress_delivery_address meta. It is used in the order summary and in the Delivery address block of the customer and service panel.

Parameters#

ParameterTypeDescription
$user_addressstringThe delivery address as a comma-separated string.
$address_infoarray|stringThe raw _rpress_delivery_address meta value; an array with keys such as address, flat, city, postcode and phone, or an empty string when none is stored.

Return value#

string. The address text to display.

Example#

function my_admin_delivery_address( $user_address, $address_info ) {
	if ( is_array( $address_info ) && ! empty( $address_info['phone'] ) ) {
		$user_address .= ' (' . $address_info['phone'] . ')';
	}
	return $user_address;
}
add_filter( 'rpress_admin_receipt_delivery_address', 'my_admin_delivery_address', 10, 2 );

Notes#

Applied in two places: the summary location line, where HTML tags are stripped, and the delivery address block, where the result passes through wp_kses_post().

Source#

Applied in:

  • includes/admin/payments/view-order-details.php (line 115)
  • includes/admin/payments/view-order-details.php (line 1058)

See also#

Was this page helpful?