этот кусок
foreach ( $general_att_array['options'] as $general_att_value ) {
$products .= "\n\t\t\t<param name=\"". $tax_att->labels->singular_name ."\">";
$att_term = get_term($general_att_value);
$products .="\n\t\t\t" . $att_term->name . "</param>";
}
замените на
$attr = [];
foreach ( $general_att_array[ 'options' ] as $general_att_value ) {
$att_term = get_term( $general_att_value );
$attr[] = $att_term->name;
}
$products .= "\n\t\t\t" . sprintf('<param name="%s">%s</param>',$tax_att->labels->singular_name,implode( ',', $attr ));