Skip to content
Docs
Get RestroPress

Action

rpress_purchase_receipt_before_tax_table

Updated
On this page

Fires before the tax row of the order items table in the order list email tag.

Runs when taxes are enabled (rpress_use_taxes) and the order items table is rendered for an email or receipt. Output echoed by the callback appears inside the table just before the tax row. Use it to add table rows between the fees and the tax line.

Parameters#

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

Example#

function my_receipt_before_tax_row( $payment_id ) {
	echo '<tr><td colspan="2" style="text-align:right;">' . esc_html__( 'Prices shown before tax', 'my-plugin' ) . '</td><td></td></tr>';
}
add_action( 'rpress_purchase_receipt_before_tax_table', 'my_receipt_before_tax_row', 10, 1 );

Notes#

Only fires when rpress_use_taxes() returns true.

Source#

Fired from:

  • includes/emails/email-tags.php (line 357), in rpress_email_tag_fooditem_list()

See also#

Was this page helpful?