Filter
rpress_get_fooditem_type
On this page
Filters the type of a menu item, default or bundle.
Runs at the end of RPRESS_Fooditem::get_type(). The value comes from the _rpress_product_type meta and falls back to default. Unlike some other getters, this filter is applied on every call.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$type | string | Menu item type, default or bundle. |
$ID | int | Menu item ID. |
Return value#
string. The menu item type.
Example#
function my_fooditem_type( $type, $fooditem_id ) {
return $type;
}
add_filter( 'rpress_get_fooditem_type', 'my_fooditem_type', 10, 2 );
Source#
Applied in:
includes/class-rpress-fooditem.php(line 340), inRPRESS_Fooditem::get_type()
See also#
Was this page helpful?
