By default, WooCommerce includes variable products on all archive page types including shop, category and tag archives. However, it does not include the options for each variation.
The code in this download folder includes variation options like simple products on all archive page type loops including shop, product_cat and product_tag archives.
The screenshot above shows the variable product and its options, variable product -1 and variable product – 2 as single products on the shop page.
Shows you how to include options for variations as single products on your WooCommerce shop page.
Once you create a publish a variable product, the options for this product will be generated and shown like simple products on your shop page which can be added directly to the cart from any archive.
Works in any WordPress theme.
Copy and paste the PHP code ( without the opening PHP tag ) to the end of your child themes functions.php file.