My solution in case someone wants an example:
// FILTER FOR PREMIUM CONTENT FOR COMPANIES
add_filter('acf/fields/taxonomy/query', 'moxie_acf_company_premium', 10, 3);
function moxie_acf_company_premium( $args, $field, $post_id ) {
$args['taxonomy'] = 'category';
$args['meta-query'] = array(
array (
'key' => 'premium',
'value' => 'yes',
)
);
return $args;
}
Totally figured it out. I had the field displaying as checkboxes. It would be nice to have the checkbox be an option. The multi-select is a bit of a clunky option.
It turns out it was an issue with WooCommerce’s function returning the correct taxonomy id. I appreciate the help and sorry for the false alarm.
I believe the extra underscore interferes with the parsing of the taxonomy_id string. This is the first time I have had to deal with a taxonomy that had an underscore in it and it is the first time that get_field has not worked for me.
I’m trying to rule out issues. I’ve already checked spelling. Not sure what else to try.