Codex for Ticket Availability Sale Ends Date

WordPress Event Management, Calendars & Registration Forums General Question Codex for Ticket Availability Sale Ends Date

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

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

    Hi Stephen,

    I would like to show the ticket sale ends date (ticket availability) in my event details. This
    would be to show our members when ‘registration’ for a trip is closed.

    I’ve looked through the codex list and can’t find it, can you help please.

    Thanks,
    Lorie

    Lorie Travis
    #27050

    Hi Lorie,

    You can get the tickets of an event using eo_get_event_tickets() (see codex)

    That returns an array of tickets (which are also arrays). You can get a DateTime object of the start/end datetime of the sale period with $ticket['from'] and $ticket['to'] respectively (if a period is set).

    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.