Support

Home Forums Event Espresso Premium EE4: How to customize waitlist message

EE4: How to customize waitlist message

Posted: July 19, 2017 at 1:58 am

Viewing 3 reply threads


Charu Chandiram

July 19, 2017 at 1:58 am

I have added the following to my custom plug in on my site. Now I see a form appear where the customer can provide their details.

There is a custom message below the submit button of the ninja form that I would like to change. It currently says “Event Name is currently sold out.
Please check back again later, as spots may become available.”

How do I customize this message?

Thanks

/* Ninja Forms for Event Espresso 4 Waitlist */
// Display a contact form when the event is sold out
// to be used as a waiting list
function ee_espresso_clean_event_status( $event ) {
$status = $event instanceof EE_Event ? $event->get_active_status() : ‘inactive’;
return $status;
}

function ee_special_sold_out_message( $EVT_ID, $event ) {

//Set the ID of the Ninja Form you wish to call here.
$ninja_forms_id = 1;

//Check if the event is sold out.
if ( ee_espresso_clean_event_status( $event ) == ‘DTS’ ) {
if( method_exists( ‘Ninja_Forms’, ‘display’) ) {
//Using Ninja Forms v3+
Ninja_Forms()->display( $ninja_forms_id );
} elseif( function_exists( ‘ninja_forms_display_form’ ) ) {
//Using a previous version of Ninja Forms
ninja_forms_display_form( $ninja_forms_id );
}
}
}
add_action( ‘AHEE__ticket_selector_chart__template__after_ticket_selector’, ‘ee_special_sold_out_message’, 10, 2 );


Tony

  • Support Staff

July 19, 2017 at 3:38 am

Hi there,

That message is actually nothing to do with the custom function above, it’s from EE core.

You can change that message in 2 ways, either translating the original text to something else or using a filter to return your own message.

Translation: https://gist.github.com/Pebblo/8201e23daaaf479e70ad7472e9477f8e

Filter: https://gist.github.com/Pebblo/f2298d46a1d4aac5da7abea355699a1c

If your site is in English the section option is a little fast than the first.

You can add either of those 2 functions within a custom functions plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


Charu Chandiram

July 20, 2017 at 4:28 am

Thanks. That works great!


Tony

  • Support Staff

July 20, 2017 at 9:15 am

You’re most welcome 🙂

Viewing 3 reply threads

The support post ‘EE4: How to customize waitlist message’ 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