最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin4浏览0评论

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)

  1. 暂无评论