fix error deleting taxonomy via api (#229)
This commit is contained in:
parent
4d77dd6d7d
commit
95f2f58056
|
@ -122,6 +122,7 @@ class REST_Taxonomies_Controller extends REST_Controller {
|
|||
$item_arr['collections_ids'] = [];
|
||||
|
||||
$taxonomy = get_taxonomy( $item->get_db_identifier() );
|
||||
if (is_object($taxonomy) && isset($taxonomy->object_type) && is_array($taxonomy->object_type)) {
|
||||
foreach ($taxonomy->object_type as $slug) {
|
||||
|
||||
$tax_collection = Repositories\Collections::get_instance()->fetch_by_db_identifier($slug);
|
||||
|
@ -131,7 +132,7 @@ class REST_Taxonomies_Controller extends REST_Controller {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue