Query child posts with tax query on parents

My solution to this ended up splitting this into 2 queries:

  1. Get the IDs of all the parent products I want to ignore
  2. Get all the variations that don’t a post_parent from that list of IDs

    $archived_products = wc_get_products(
        array(
            'type' => array( 'variable', 'variable-subscription' ),
            'paginate' => false,
            'limit' => -1,
            'category' => array( 'archive', 'membership' ),
            'return' => 'ids',
        )
    );
    $my_query->set( 'post_parent__not_in', $archived_products );