Event Tickets Plus event date

Home Forums Ticket Products Event Tickets Plus Event Tickets Plus event date

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1141410
    Jens Kirk
    Participant

    Hi

    Does the ticket hold the information about the event start date?

    I need to work with woo commerce in order to send reminder emails. As this is not yet possible through Tribe products (as I understand it), I need to use a product such as Follow Ups. This plugin is only looking at the Woo product which is created by Event Tickets plus.

    Is it therefore possible to pass Event start date automatically unto the ticket and woo product ?

    What would be your advice?

    Cheers,

    #1141621
    George
    Participant

    Hey @Jens,

    Thanks for reaching out!

    The “Product” object itself unfortunately does not include the start or end dates of the corresponding event. To see all of the properties on a WooCommerce “product” object, I have copied and pasted an example object into a Gist here ? https://git.io/vKoqj

    In any context where you have the product ID, though, you should be able to get the event ID (and thus basically any event information you need!) by using code like the following:


    // Let's assume you have a $product_id variable somewhere here.

    $Event_Tickets_Plus = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();
    $event_id = $Event_Tickets_Plus->get_event_for_ticket( $product_id );

    That $event_id variable is now an actual event ID. You can then use this with any of The Events Calendar’s template tags and helper functions to extract specific bits of information about the information.

    To find all of these functions, head to either of the following sets of files within your copy of The Events Calendar:

    the-events-calendar/src/functions/template-tags

    and/or:

    the-events-calendar/common/src/functions/template-tags/

    ☝️ In these folders, you will find all sorts of files with straightforward names that contain easy-to-use helper functions. For example, the “date.php” files contain functions related to event dates.

    So you might explore those files and find the function tribe_get_start_date().

    With the bit of code I shared above, then, you could write something like this to get the event start from a ticket/product ID:


    // Let's assume you have a $product_id variable somewhere here.

    $Event_Tickets_Plus = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();
    $event_id = $Event_Tickets_Plus->get_event_for_ticket( $product_id );

    $start_date = tribe_get_start_date( $event_id );

    I hope that helps!
    George

    #1142685
    Jens Kirk
    Participant

    Hi George

    Great answer!

    What I am looking for is actually a requested feature, ranking nr. 4 on the requests and the most popular feature flagged as “Planned”.

    My question is therefore, is there any way we can push for development? Would you be able to supply a quote on finishing the feature ?

    The alternative for us is to work in an integration to Follow Ups which will eventually be redundant .. so the native solution would be highly preferred.

    Thanks for a great plugin!
    Cheers,

    • This reply was modified 9 years, 9 months ago by Jens Kirk. Reason: wording
    #1142690
    George
    Participant

    Hey Jens,

    Thank you for sharing this detail. While I can confirm that we are working actively on a set of tools for event promotion as described in that feature request you linked to, we unfortunately cannot be “paid” to speed it up and such.

    I’m sorry to disappoint on that front, but do hope the code I shared above is helpful in some way.

    Please let me know if you have any further thoughts or questions!

    Sincerely,
    George

    #1142868
    Jens Kirk
    Participant

    Hi George, thanks for the clear and fast answer!

    Unfortunate that we can’t push the development. Could you give a rough idea on when you aim to deploy these functions?
    The answer is important to us regarding our effort to write a hack ourselves.

    Thanks for great plugin!
    cheers

    #1143076
    George
    Participant

    Hey Jens,

    While I don’t have any specific ETA for those features, it will probably not be for at least another three months if all development goes exactly to plan.

    I apologize for the vagueness, but just want to be honest because there are many projects in active development and so this will take several months before completion.

    Sincerely,
    George

    #1151310
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Event Tickets Plus event date’ is closed to new replies.