Filter
rpress_get_price_name
On this page
Filters the name of a menu item price option.
Runs at the end of rpress_get_price_name(). The value is the name of the variable price matching options['price_id'], or false when the item has no variable prices or no match.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$return | string|false | Price option name. |
$fooditem_id | int | Menu item (fooditem) post ID. |
$options | array | Options holding price_id. |
Return value#
string|false. The price option name.
Example#
function my_get_price_name( $return, $fooditem_id, $options ) {
return $return ? ucfirst( $return ) : $return;
}
add_filter( 'rpress_get_price_name', 'my_get_price_name', 10, 3 );
Source#
Applied in:
includes/cart/functions.php(line 216), inrpress_get_price_name()
See also#
Was this page helpful?
