Change view and style/print and link distable for soldout Event

WordPress Event Management, Calendars & Registration Forums General Question Change view and style/print and link distable for soldout Event

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 2 weeks ago.

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

    Hello

    i don’t speak english.
    this question is transrate with google.
    if don’t understand,report please.

    Is it possible to display “Sold out” when an event is sold out on the full calendar?
    Is it possible to not link to the details page when an event is sold out on the full calendar?
    Thank you in advance.

    otomo hirofumi
    #44568

    Hi, Otoma,

    The following code should do that:

    add_filter('eventorganiser_fullcalendar_event','myprefix_maybe_remove_calendar_link',10,3);
    function myprefix_maybe_remove_calendar_link( $event, $event_id, $occurrence_id ){
    
        $remaining = eo_get_remaining_tickets_count( $event_id, $occurrence_id );
        if ( $remaining === 0 ) {
            $event['url'] = false; // Remove link
            $event['title'] .= " (sold out)"; //The name of the event as it appears in the calendar
            $event['description'] = "sold out";  // The content of the tooltip of the even in the calendar
        } else {
            $event['description'] = "$remaining tickets remaining";
        }
    
        return $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.