benecaster_tier_price_output
Filters the text output of [benecaster_tier_price] before it is returned to the page. Returns empty string if the tier is not found or price is unavailable.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$output |
string |
— | Raw price number as text (e.g. '15'); empty string if not found |
$tier_slug |
string |
— | Tier slug that was looked up |
$atts |
array |
— | Resolved shortcode attributes |
Returns:
string
Example
add_filter( 'benecaster_tier_price_output', function( $output, $tier_slug, $atts ) {
// Format the raw price with a currency symbol.
if ( '' !== $output ) {
$output = '$' . number_format( (float) $output, 2 ) . '/mo';
}
return $output;
}, 10, 3 );