Filter
rp_food_addon_column_extra_html
On this page
Allows extra output next to the price of an add-on item in the menu item popup.
Called inside the quantity/price column of each add-on item. The call is made as a statement and its return value is neither echoed nor used, so a callback has to echo its HTML directly. It is fired once for each add-on price row.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$child_addon_id | int | Term ID of the add-on item. |
$get_addon_price | float|string | Price of the add-on for the current price option. |
$addon_id | int | Term ID of the add-on group. |
$child_addon_slug | string | Slug of the add-on item. |
Return value#
mixed. Ignored by the caller.
Example#
function my_addon_extra_html( $child_addon_id, $get_addon_price, $addon_id, $child_addon_slug ) {
echo '<span class="my-addon-id">' . esc_html( $child_addon_id ) . '</span>';
return $child_addon_id;
}
add_filter( 'rp_food_addon_column_extra_html', 'my_addon_extra_html', 10, 4 );
Notes#
Works like an action: the filtered value is discarded, so output must be echoed.
Source#
Applied in:
includes/rp-ajax-functions.php(line 355), inget_fooditem_lists()includes/rp-ajax-functions.php(line 384), inget_fooditem_lists()
See also#
Was this page helpful?
