diff --git a/includes/class-wc-cache-helper.php b/includes/class-wc-cache-helper.php index c2fe644d1a6..052a2244073 100644 --- a/includes/class-wc-cache-helper.php +++ b/includes/class-wc-cache-helper.php @@ -217,6 +217,8 @@ class WC_Cache_Helper { if ( 'product_cat' === $taxonomy ) { $ids = is_array( $ids ) ? $ids : array( $ids ); + $clear_ids = array(); + foreach ( $ids as $id ) { $clear_ids[] = $id; $clear_ids = array_merge( $clear_ids, get_ancestors( $id, 'product_cat', 'taxonomy' ) );