Check if term object is in array
I want to check if a term object is in an get_terms array, but i really can’t figure out how to do it. $subcat_terms = get_terms([ ‘taxonomy’ => ‘product_cat’ ]); $subcat_terms generates an array like this: array (size=3) 0 => object(WP_Term)[10551] public ‘term_id’ => int 16 public ‘name’ => string ‘Hardware’ (length=8) public ‘slug’ => … Read more