Skip to content
Docs
Get RestroPress

Filter

rpress_email_show_names

Updated
On this page

Filters whether menu item names are built in the order list email tag.

Runs inside the callback for the order items email tag (rpress_email_tag_fooditem_list) before the item rows are rendered. The default is true. Returning false skips building each item title, so the name cell is rendered empty for every row.

Parameters#

ParameterTypeDescription
$show_namesboolWhether to build menu item titles. Defaults to true.

Return value#

bool. True to show menu item names, false to skip building them.

Example#

function my_email_show_names( $show_names ) {
	return true;
}
add_filter( 'rpress_email_show_names', 'my_email_show_names', 10, 1 );

Notes#

Returning false leaves the title variable unset in the template loop, so the name column is empty and PHP may log an undefined variable notice.

Source#

Applied in:

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

See also#

Was this page helpful?