Woocommerce – Change Variable Product Add to Cart to behave like external product using Custom Field (link) [closed]

I was able to find the solution. This is so simple and I can’t believe I did not just do this first, but there you are (duh), I thought it was more complex than that…

My solution is below:

Copy woocommerce template to my theme to override single-product/add-to-cart/variable.php

editing variables.php, change the

<?php echo esc_url( $product->add_to_cart_url() ); ?>

to the below (replace by calling my custom field url):

<?php echo get_post_meta($post->ID, 'Buy_Link', true); ?>

Anyway, this works a treat to get the link to the buy button (and bypasses the cart altogether) but still allowing variations to be shown.
Now I just need to get a custom field for EACH variation instead of only one custom field per variable product (didn’t realise this limitation)! Then I can have the appropriate link for EACH variation, not just default product variation.

Hope this helps someone out there.