Issue title: Trying to get property 'category_id' of non-object in CategoryLookup classs
 Issue body: There is a bug in update method in CategoryLookup class. 
Getting message 
`Trying to get property 'category_id' of non-object`

It seems line 191 should be 
`$inserts[] = $this->get_insert_sql( $child, $ancestor );`
instead of 
`$inserts[] = $this->get_insert_sql( $child->category_id, $ancestor );`
 Comments: 
 Comment 0: Hi @Hartamon,
Thanks for creating this issue.
I am trying to reproduce the above message but I am unable too, are you able to provide some reproducible test instructions? That will give a better sense of what might be the issue, thanks!
 Comment 1: Hi @louwie17. I faced this issue attempting to change term parent during products import.
The point is that function `get_term_children` returns an array of IDs, not an array of objects.
Here is the code snippet

```
protected function update( $category_id ) {
		global $wpdb;

		$ancestors = get_ancestors( $category_id, 'product_cat', 'taxonomy' );
		$children  = get_term_children( $category_id, 'product_cat' );
		$inserts   = array();
		$inserts[] = $this->get_insert_sql( $category_id, $category_id );

		foreach ( $ancestors as $ancestor ) {
			$inserts[] = $this->get_insert_sql( $category_id, $ancestor );

			foreach ( $children as $child ) {
				$inserts[] = $this->get_insert_sql( $child->category_id, $ancestor );
			}
		}

		$insert_string = implode( ',', $inserts );

		$wpdb->query( "INSERT IGNORE INTO $wpdb->wc_category_lookup (category_id, category_tree_id) VALUES {$insert_string}" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
	}
```

 Comment 2: > Hi @louwie17. I faced this issue attempting to change term parent during products import.
> The point is that function `get_term_children` returns an array of IDs, not an array of objects.

Thanks @Hartamon, I was able to reproduce it now by changing a category parent that has children. It does look like it only return category id's, which it actually expects in another function within the same class: https://github.com/woocommerce/woocommerce-admin/blob/main/src/CategoryLookup.php#L165-L167

I will create a PR to update that, strangely enough it doesn't appear to break anything although it sets the `category_lookup` to an `id` of `0`.



{'source': 'GithubIssues', 'repo_name_with_owner': 'woocommerce/woocommerce-admin', 'issue_id': 1000219767, 'repo_stars': 275.0}