"by date" Ticket count

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 9 years, 12 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15606

    On the single-event.php page I would like to show the remaining ticket count only for “By date” events types, not letting it appear if the event type is “By series”. I use both type on the website. Is it possible to tell if an event is a “By date” or “By series” and then use “eo_get_remaining_tickets_count” Can it be done something like this?

    if (type By date){
    $remaining = eo_get_remaining_tickets_count( get_the_ID() );
    if( $remaining > 1 ){
    printf( 'Hurry, only %d tickets remaining', $remaining );
    }elseif( $remaining == 1 ){
    echo 'Only one ticket remaining!';
    }else{
    echo 'Sorry, there are not tickets available';
    }
    }

    If it is possible how would I write the if statement?

    Many thanks

    Regards, Tony

    Tony
    #15643

    Hi Tony,

    “by date” or “by series” is a site-wide setting on how to sell tickets for events, and cannot be configured for individual events. This setting should only really affect recurring events.

    Do you mean determine if an event is a recurring event or single event?

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.