Skip to content
Docs
Get RestroPress

Action

rpress_before_payment_receipt

Updated
On this page

Fires before the order receipt and tracking page content.

Runs in the receipt shortcode template after the order has been loaded and before the receipt markup. It is output only when the order exists.

Parameters#

ParameterTypeDescription
$paymentWP_PostOrder post object being displayed.
$rpress_receipt_argsarrayReceipt shortcode attributes, such as the payment_key and which sections to show.

Example#

add_action( 'rpress_before_payment_receipt', 'my_before_receipt', 10, 2 );
function my_before_receipt( $payment, $rpress_receipt_args ) {
	echo '<p>' . esc_html( sprintf( __( 'Order #%d', 'my-textdomain' ), $payment->ID ) ) . '</p>';
}

Source#

Fired from:

  • templates/shortcode-receipt.php (line 175)

See also#

Was this page helpful?