How to get all tags collections in woocommerce?

You need to loop through the array and create a separate array to check in_array because get_terms return object with in array.

$terms = get_terms( 'product_tag' );
$term_array = array();
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
    foreach ( $terms as $term ) {
        $term_array[] = $term->name;
    }
}

solution from stackoverflow click for more details