Recently something like this stopped working for me...
$arg = array('child_of' => $catid,'hide_empty' => false);
$subcategories = get_categories( $arg );
This is a touch different from what I had when the bug came about but I'm struggling to populate $subcategories with any data in the returned array despite the fact that $catid is a category with children. This worked perfect in the last 2-3 months then suddenly no longer returns anything.
It results in duplicate categories as the script then behaves as if no matching category was found later on.
Anyone have any ideas what I'm doing wrong?
Thanks for your help