How to change this WP_Query to get all ProductIDs and not only specific one?

Question

I am using plugin FooEvents and want to export tickets attendees. But in the core files of the plugin, the export is only possible for 1 specific product. So if I want to export attendees for ticket “Startups” I need to do that from the edit product page and only tickets for “Startups” get exported. But I want to export all ticket attendees (Startups, Scaleups, Investors …)

This is how the code for export looks like:

    $events_query = new WP_Query( array('post_type' => array('event_magic_tickets'), 'posts_per_page' => -1, 'meta_query' => array( array( 'key' => 'WooCommerceEventsProductID', 'value' => $event ) )) );
$events = $events_query->get_posts();

Now if I understand correctly, the key thing is in the ‘meta_query’ and WooCommerceEventsProductID

So my question is: how do I change this to get all tickets and not only WooCommerceEventsProductID?

Best regards

0
user175679 3 years 2020-04-03T08:50:50-05:00 0 Answers 86 views 0

Leave an answer

Browse
Browse