WooCommerce: Display product categories to make IF statement

Try This Code

        <?php global $post;
    $terms = get_the_terms( $post->ID, 'product_cat' );
    foreach ($terms as $term) {
        $product_cat_id = $term->term_id;
        break;
    }

    if ($product_cat_id == "6" && $product_cat_id == "7" ) {
    echo "aaabbb";
    }
 else if ($product_cat_id == "6"  ) {
    echo "aaa";
    }
    else if ($product_cat_id == "7") {
    echo "bbb";
    }
    ?>

tech