Actually, there is no property called $all in get_the_terms. I am giving a few available fields which you can use
stdClass Object
(
[term_id] =>
[name] =>
[slug] =>
[term_group] =>
[term_order] =>
[term_taxonomy_id] =>
[taxonomy] =>
[description] =>
[parent] =>
[count] =>
[object_id] =>
)
I believe you need only single term from the returned array, you can try this: (NOTE: get_the_terms returns a WP_ERROR object on invalid taxonomy, so you need to test that, also check whether or not you have terms retrieved)
$terms = get_the_terms( $post->ID, 'product_cat' );
if ( $terms && ! is_wp_error( $terms ) ) {
echo $terms[0]->name;
}
This $terms[0] will return the single term in the returned array.