Posted: June 9, 2014 at 12:42 pm
|
Hi, I’m trying to get ticket prices as per this post. However the tickets() function is not actually setup. There’s no direct relationship between events and tickets only datetimes and tickets. Here’s the error:
EE4 latest, WP latest etc. Thanks. |
|
Any thoughts? Can you tell me how to retrieve prices in EE4? I found lots of functions but everything is protected… |
|
Any particular reason why both my posts on this forum are being ignored? I’ve tried to be pretty specific about the issues. Most posts before and after have been responded to. |
|
I did this: $events = get_posts(array("post_type"=>'espresso_events')); //var_dump($events); foreach ($events as $event) { if ( !empty( $event->EE_Event ) ) { $datetimes = $event->EE_Event->datetimes_ordered(); //var_dump($datetimes); foreach($datetimes as $datetime) { $tickets = $datetime->tickets(); var_dump($tickets); } } } |
|
Right, that returns the EE_Ticket object but as I said all of the values are protected or private. Relevant values: |
|
The ticket objects should have all the public methods on them listed here: http://code.eventespresso.com/classes/EE_Ticket.html |
|
Wow that’s really helpful I’ve been looking through the docs on this site but I didn’t come across any of that. Probably answers my other question too. Thanks. |
The support post ‘EE_Event->tickets() not setup’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.