To try to add either a “meta_query” ar “tax_query” to the default attributes, so that these query additions will be ran when querying events, I get the db error mentioned above.
//Here is an example of my tax query attribute that I pass to the filter.
$tax_query_args = array(
array(
'taxonomy' => 'espresso_event_categories',
'field' => 'name',
'terms' => array('SomeEventCategoryHERE')
));
$atts['tax_query'] = tax_query_args;
This also happens if I filter the global query and interject my code there as well. This happens inside or outisde of the filter I posted above.
$wp_query->set( 'tax_query', $tax_query_args );
So it seems at the current time we are NOT able to add or modify to the query that queries espresso events?
It looks like this Github issue is similar, but it says it has been fixed.
The filter hook EES_Espresso_Events__process_shortcode__default_espresso_events_shortcode_atts
is for filtering shortcode attributes. If you’re trying to modify or add to the query, you can use native WP filter hooks like posts_where, posts_join, and so on. Here’s an example of that shows how from the code snippet library:
The support post ‘Database Error "Not unique table"’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.