Woocommerce: all products of all categories instead products of one category

The problem with the sample code is that the query is reset before echoing the result.

Instead follow the sample you linked to:

$args = array(
    'post_type' => 'product',
    'posts_per_page' => -1,
    'product_cat' => 'pyvo-v-pliashkah'
);

$products_query = new WP_Query( $args );

// output what you want

wp_reset_query();