Custom query is not working when Forminator is active

Forminator is conflicting with my child theme’s function.php specifically with the following code:
// Add custom posts to catergory searches
function namespace_add_custom_types( $query ) {
if( is_category() || is_tag() && empty( $query->query_vars[‘suppress_filters’] ) ) {
$query->set( ‘post_type’, array( ‘post’, ‘nav_menu_item’, ‘mycustompost’ ));
return $query; } }
add_filter( ‘pre_get_posts’, ‘namespace_add_custom_types’ );

This worked before one of the most recent updates. If I disable Forminator everything works, or if I leave Forminator and remove that code from the child functions.php everything works. However I’d like to keep both active.
That code is intended to make the custom post type show up in categorical post listing on the site along with the normal posts.