Skip to content
Docs
Get RestroPress

Action

rpress_order_after_view_details

Updated
On this page

Fires after the View Details button of an order in the order history list.

Runs once per order, inside the actions area of the order card and before the Reorder button. Use it to add extra links or buttons for an order.

Parameters#

ParameterTypeDescription
$payment_idintID of the order.
$payment_metaarrayPayment meta of the order.

Example#

add_action( 'rpress_order_after_view_details', 'my_order_receipt_link', 10, 2 );
function my_order_receipt_link( $payment_id, $payment_meta ) {
	echo '<a href="' . esc_url( add_query_arg( 'order', $payment_id, home_url( '/support/' ) ) ) . '">' . esc_html__( 'Get help', 'my-textdomain' ) . '</a>';
}

Notes#

Fired from both the main order history template and the load-more template, so cards loaded by infinite scroll also run it.

Source#

Fired from:

  • templates/history-purchases.php (line 126)
  • templates/rpress-order-history-load-more.php (line 104)

See also#

Was this page helpful?