Skip to content
Docs
Get RestroPress

Filter

rpress_view_service_details_after

Updated
On this page

Fires after the service fields in the edit panel of the order details screen.

Called with apply_filters() at the end of the service fields column in the Service edit panel of the order details screen. The return value is discarded, so it behaves like an action: a callback can echo extra markup and should return the value it received.

Parameters#

ParameterTypeDescription
$payment_idintID of the order (payment) being viewed.

Return value#

int. The unchanged order ID. The value is ignored by the caller.

Example#

function my_service_fields_after( $payment_id ) {
	echo '<p><strong>Courier ref</strong> ' . esc_html( get_post_meta( $payment_id, '_my_courier_ref', true ) ) . '</p>';
	return $payment_id;
}
add_filter( 'rpress_view_service_details_after', 'my_service_fields_after', 10, 1 );

Notes#

Registered as a filter but the result is not used. Hook it with add_filter() and return the first argument.

Source#

Applied in:

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

See also#

Was this page helpful?