I found the problem. It’s in this snippet which is designed to show the base ticket price before add-ons.
/* display the base price of the ticket in the ticket selector instead of the price with price modifiers */
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 ) {
$base_price = $ticket->base_price();
return $base_price->amount();
}
function espresso_vip_tickets_displayed( $ticket_row_html, EE_Ticket $ticket ) {
$cap_required = $ticket->get_extra_meta( 'ee_ticket_cap_required', true );
if ( empty( $cap_required ) ) {
return false;
}
if ( ( is_admin() && ! EE_FRONT_AJAX ) || ! empty( $cap_required ) && is_user_logged_in() && EE_Registry::instance()->CAP->current_user_can( $cap_required, 'wp_user_ticket_selector_check' ) ) {
return false; //cap required but user has access so continue on please.
}
$ticket_row_html = '';
return $ticket_row_html;
}
add_filter( 'FHEE__ticket_selector_chart_template__do_ticket_entire_row', 'espresso_vip_tickets_displayed', 10, 2 );
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
//* Disable email match check for logged out users
add_filter( 'EED_WP_Users_SPCO__verify_user_access__perform_email_user_match_check', 'ee_wp_users_remove_email_user_match_check_logged_out' );
function ee_wp_users_remove_email_user_match_check_logged_out() {
if ( ! is_user_logged_in() ) {
return false;
} else {
return true;
}
}
I implemented it to show the price before fees, But it seems that it also affects the display of bundle pricing. Is there a way to tweek the snippet so that bundle prices display as in the documentation?
I’d use the same method the ticket selector uses to determine if the ticket is a bundle and just return the default price, otherwise use the base price, like so:
$ticket_min = $ticket->min();
// for ticket bundles, set min and max qty the same
if ($ticket_min !== 0 && $ticket_min === $ticket->max()) {
//Bundle ticket, return the default price
return $ticket_price;
}
return $ticket->base_price()->amount();
Viewing 3 reply threads
The support post ‘Bundle Price Display is incorrect ee5’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.