Skip to content
Docs
Get RestroPress

Filter

rpress_get_price_name

Updated
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#

ParameterTypeDescription
$returnstring|falsePrice option name.
$fooditem_idintMenu item (fooditem) post ID.
$optionsarrayOptions 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), in rpress_get_price_name()

See also#

Was this page helpful?