Skip to content
Docs
Get RestroPress

Action

rpress_purchase_receipt_after_qantity_table

Updated
On this page

Fires inside the quantity cell for each add-on item in the order list email tag.

Runs once per add-on item of a cart line, inside the quantity column of the order items table that the email tag renders. Output echoed by the callback appears under the quantity of that line. The argument is the add-on item array as stored on the cart line, containing keys such as addon_item_name, addon_id, price and quantity.

Parameters#

ParameterTypeDescription
$addon_itemarrayOne entry of the cart line's addon_items array.

Example#

function my_receipt_addon_quantity( $addon_item ) {
	if ( ! empty( $addon_item['quantity'] ) ) {
		echo '<div style="font-size:12px;color:#666;">x' . absint( $addon_item['quantity'] ) . '</div>';
	}
}
add_action( 'rpress_purchase_receipt_after_qantity_table', 'my_receipt_addon_quantity', 10, 1 );

Notes#

The hook name contains a typo (qantity) and must be used as spelled.

Source#

Fired from:

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

See also#

Was this page helpful?