Support

Home Forums Multiple Event Registration Add-on Any filter to show different "Add to Event Cart" on event detail page than other

Any filter to show different "Add to Event Cart" on event detail page than other

Posted: October 18, 2016 at 6:51 pm


gdswalia

October 18, 2016 at 6:51 pm

Hello, Just need help to change “Add to Event Cart” text on a particular event detail page. I tried with filter
add_filter( 'FHEE__EED_Multi_Event_Registration__set_definitions__event_cart_name', 'ee_mer_change_cart_name' ); but it’s changing button text in event listings as well. And I tried with “is_page()/is_single()” still did not work.

I Need to change “Add to event cart” button text changed on one particular event page. If any example that can help me to use is_page() function or any other filter that may help.


gdswalia

October 18, 2016 at 6:52 pm

Hello, Just need help to change “Add to Event Cart” text on a particular event detail page. I tried with filter
add_filter( 'FHEE__EED_Multi_Event_Registration__set_definitions__event_cart_name', 'ee_mer_change_cart_name' ); but it’s changing button text in event listings as well. And I tried with “is_page()/is_single()” still did not work.

I Need to change “Add to event cart” button text changed on one particular event page. If any example that can help me to use is_page() function or any other filter that may help.


Josh

  • Support Staff

October 19, 2016 at 9:27 am

Hi there,

You could use the FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text filter hook. For example:

add_filter( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text', 'ee_mer_change_cart_button', 11 );
function ee_mer_change_cart_button( $text ) {
    if ( is_single( '85' ) ) {
        $text = 'button text for one event';
    } else {
        $text = 'button text for all other events';
    }
    return $text;
}


gdswalia

October 19, 2016 at 3:51 pm

Hi Josh, Thanks for you help. It is working now as I wanted to. Great help and Thanks again!!!

The support post ‘Any filter to show different "Add to Event Cart" on event detail page than other’ 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.

Event Espresso