fix: add test in `term_exists` if any of the taxonomies do not exist.
This commit is contained in:
parent
1d755951c0
commit
c5dc4ad063
|
@ -321,7 +321,7 @@ class Terms extends Repository {
|
||||||
|
|
||||||
$terms = get_terms($args);
|
$terms = get_terms($args);
|
||||||
|
|
||||||
if (empty($terms)) {
|
if (empty($terms) || $terms instanceof \WP_Error) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue