Filters

Filters

Filters are snippets of code that allow you to pass data through, they are used to enable overriding data used in plugins and themes. This plugin has several features allowing you to customise some aspects. Normally filters are applied to customise themes by inserting the code into a child theme’s functions.php.

Filters in Free

Combined Date – Time Format

The combined date / time format appears in several layouts and typically looks like 12/02/2019, 10:00 – 11:00

filter: (‘wfea_combined_date_time_time_format‘ , $format)

$format defaults to your settings -> general -> time format

example: include am / pm

add_filter( 'wfea_combined_date_time_time_format', function ( $format ) {
	return 'g:i a';
}, 10, 1 );

filter: (‘wfea_combined_date_time_date_format‘ , $format)

$format defaults to your settings -> general -> date format, plus a , and space

example: display like 16th January

add_filter( 'wfea_combined_date_time_date_format', function ( $format ) {
	return 'jS F';
}, 10, 1 );

Date formats are documented here https://wordpress.org/support/article/formatting-date-and-time/

filter: (‘wfea_event_time‘ , $event_time, $start, $end)

Override totally

add_filter( 'wfea_event_time', function ( $event_time, $start, $end ) {
       // do you stuff  to update $event_time
	return $event_time;
}, 10, 1 );

filter: (‘wfea_eventbrite_event_start‘ , $start)

Do something with the local start time

add_filter( 'wfea_eventbrite_event_start', function ( $start ) {
       // do you stuff  to update $start
	return $start;
}, 10, 1 );

filter: (‘wfea_eventbrite_event_end‘ , $end)

Do something with the local end time

add_filter( 'wfea_eventbrite_event_end', function ( $end ) {
       // do you stuff  to update $end
	return $end;
}, 10, 1 );

Extra Filters in Pro

filter: (‘wfea_price_display‘ , $price_display, $min, $max, $currency)

Do something with the price display

add_filter( 'wfea_price_display', function ( $price_display, $min, $max, $currency) {
       // do you stuff  to update $end
	return $price_display;
}, 10, 4 );

filter: (‘wfea_currency_symbol‘ , $symbol, $currency)

Change the symbol for a currency. Evenbrite currencies are ISO e.g. USD

add_filter( 'wfea_currency_symbol', function ( $symbol, $currency) {
       // do you stuff  to update the symbol 
	return $symbol;
}, 10, 2 );

filter: (‘wfea_availability_display‘ , $msg, $total_sold, $event_capacity)

Do something with the ticket availability display

add_filter( 'wfea_availability_display', function ( $msg, $total_sold, $event_capacity) {
       // do you stuff  change $msg 
	return $msg;
}, 10, 3 );

Was this helpful?