• Resolved markovanhoudt

    (@markovanhoudt)


    I noticed that {num/{max} is used in the event description where a user can register.
    Is it possible to use this number also in the email sent to the user?
    E.g. the max is 300 people, the current registrant is number 57.
    In the email I would like to state. “You are number 57.”

Viewing 1 replies (of 1 total)
  • Plugin Author roundupwp

    (@roundupwp)

    Hello!

    This isn’t a current email placeholder but I created a snippet to accomplish this:

    function ru_add_num_registered_template( $search_replace, $sanitized_data ) {

    $event_id = isset( $sanitized_data['event_id'] ) ? $sanitized_data['event_id'] : false;

    if ( false !== $event_id ) {
    $event_meta = rtec_get_event_meta( $event_id );
    $search_replace['{num-registered}'] = $event_meta['num_registered'];

    }

    return $search_replace;
    }
    add_filter( 'rtec_email_templating', 'ru_add_num_registered_template', 10, 2 );

    Just whack it into your themes functions.php file or use something like WPCode and then the placeholder {num-registered} will work as you are hoping.

    Thanks,

    Craig

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.