Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/c047b6a153d45268e8846d6dd026c405 to your computer and use it in GitHub Desktop.
Save joshfeck/c047b6a153d45268e8846d6dd026c405 to your computer and use it in GitHub Desktop.
This code changes the price display of the EE4 ticket selector so price modifiers are not included in the price that's shown.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter( 'FHEE__ticket_selector_chart_template__ticket_price', 'change_ee_ticket_selector_base_price_display', 10, 2 );
function change_ee_ticket_selector_base_price_display( $ticket_price, $ticket ) {
return $ticket->base_price()->amount();
}

Usage notes

You can add the above to a functions plugin or into your WordPress theme's functions.php file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment