Home / Admin / Tweak Price Display (Adjusts the Prices) | Display Eventbrite Events
Duplicate Snippet

Embed Snippet on Your Site

Tweak Price Display (Adjusts the Prices) | Display Eventbrite Events

The Display Eventbrite plugin premium version can display prices. If you want to tweak to display you can use this filter wfea_price_display.

You can adjust this code as you feel fit and can add the PHP to your functions.php, this example adjusts the prices ( reduced by 10 ) for Event ID 1234.

(Note this code snippet applies for "Display Eventbrite Events Plugin" available here: https://fullworksplugins.com/products/widget-for-eventbrite/ )

Code Preview
php
<?php
add_filter( 'wfea_price_display', function ( $price_display, $min, $max, $currency ) {
	$event_id= get_post()->ID;
	if ( $event_id == 1234 ) {
		$min = $min - 10;
		$max = $max - 10;
	}
	if ( $min == $max ) {
		$price_display = $min;
	} else {
		$price_display = $min . ' - ' . $max;
	}
	$price_display .= ' ' . $currency;
	return $price_display;
}, 10, 4 );

Comments

Add a Comment