Filter
rpress_email_show_names
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#
| Parameter | Type | Description |
|---|---|---|
$show_names | bool | Whether 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), inrpress_email_tag_fooditem_list()
See also#
Was this page helpful?
