Skip to content
Docs
Get RestroPress

Filter

rpress_get_purchase_summary

Updated
On this page

Filters the one-line summary of a purchase.

Runs at the end of rpress_get_purchase_summary(). The summary is the optional customer email followed by a comma-separated list of menu item titles.

Parameters#

ParameterTypeDescription
$summarystringThe purchase summary.
$purchase_dataarrayPurchase data including user_email and fooditems.
$emailboolWhether the customer email is prefixed.

Return value#

string. The summary.

Example#

function my_purchase_summary( $summary, $purchase_data, $email ) {
	return wp_html_excerpt( $summary, 200, '...' );
}
add_filter( 'rpress_get_purchase_summary', 'my_purchase_summary', 10, 3 );

Source#

Applied in:

  • includes/cart/functions.php (line 389), in rpress_get_purchase_summary()
Was this page helpful?