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.
Related Posts:
- How do I get WooCommerce to automatically recreate pages? [closed]
- WooCommerce – How to Add a Custom Field to Cart Items and Cart Totals [closed]
- WooCommerce – Load Templates From Plugin For All Template Files
- how to redirect to my template
- WooCommerce – Adding Custom Order Without No Product [closed]
- Is it possible to set up multistore in Woocommerce? [closed]
- How To Hide Filters On Specific Categories with WooCommerce Products Filter(WOOF)
- Woocommerce email template customization [closed]
- Only Homepage not loading properly
- Integrating non-WooCommerce and WooCommerce Orders together [closed]
- Woocommerce – How to populate custom select field with stored values on checkout page?
- How to send an automated email to the customers when product is added woocommerce
- How to toggle between two custom fields in WordPress woocommerce ‘WC Product Field Group’ plugin?
- Product queue for my subscription box
- Want to Show Sub categories under Categories section using Woo Commerce [closed]
- Redirect to another page using contact form 7? [closed]
- WordPress Phone Field Check (use numbers, spaces and pluses)
- Can export gallery but can’t import it Wp all import
- WoCommerce Cart is not showing pricing
- Problem Advanced Custom Fields PRO
- Programmatically generate new pages for a site based on page template and content elements accessed via DB
- WooCommerce Checkout Issue specific to Instagram In-App Browser
- Meta Key array building with multiple input values from fields
- Tracking sales/conversions in Woocommerce using Google Analytics
- Coupon Codes for product discount combined with conditional free shipping
- Custom product page’s style for printing
- Custom plugin issue – Notice: Trying to get property of non-object in
- Woocommerce categories displayed on every category and shopping page
- Template conflict with WC Payment Method
- Problem with conditional woocommerce custom checkout field
- How to Save settings of custom tab product page in admin side in a database?
- Turning Existing Eccommerce Site into Multi-SIte
- How ACF Advanced Custom Field works with Woocommerce Single Product [closed]
- WP Customer Reviews call short code on another page [closed]
- Need help saving input fields for Security Deposit plugin in WC Vendors page
- WooCommerce product prices not showing up correctly [closed]
- Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]
- Display out of stock products in WooCommerce [closed]
- Is there a plugin or another way that can help me find out the underlying files of a page/post? [closed]
- additional fields based on the quantity of products selected
- A multi-section WordPress store [closed]
- Hide prices and checkout functionality in woocommerce
- Recommended eCommerce Plugin for a T-Shirt Sales Business? [closed]
- How to get custom field image url of specific size
- Creating a wordpress plugin where users can override templates
- How WordPress autosave can save plugin fields?
- WordPress shopping cart that supports 2 tier product variation options
- How to remove duplicate Custom Fields?
- Make the checkbox meta field checked by default
- Manually add order item with fixed product_id in WooCommerce
- Saving Custom Post types and fields to a custom table
- WooCommerce shop page orderby [closed]
- Reduce Drop down Menu Width in WordPress
- WordPress comments not appearing in blog posts, likely because of Redux template. Could I fix this with a plugin that adds a comment form as a block? [closed]
- How to modify WCMP Rest API response?
- Woocommerce dependent plugin
- How to display (plugin?) output on a single page (not a widget, probably not a short code) – template, plugin, combination?
- CampaignMonitor for WooCommerce – Move subscribe button [closed]
- How to create an input field, and base the output on spreadsheet data? [closed]
- Pre booking doesn’t work with custom bootstrap modul in woocommerce [closed]
- Advanced Custom Field DatePicker [closed]
- Custom Pages for Woocommerce Product-Category Pages
- Woocommerce Minimum Price for a Composite Product to add in cart
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- Where to find the code used to render a page that has a shortcode and a template defined?
- WordPress User Post Products
- Add item to the woocommerce dashboard menu from a plugin
- wc_get_template new template does not showing up
- How to use template inside plugin shortcode with variables for big HTML code
- Woocommerce – WordPress Roles & Capabilities
- Pull comments from one page/post into another page/post?
- Permalinks and pagination are not working in WordPress with WP e-Commerce plugin
- Automatic recurring payment using YITH subscription and Dokan Stripe
- apply_filters(woocommerce_get_item_data, …) Causing errors when adding to cart
- Change Dashboard URL from wp-admin to wp-admin/index.php
- How To Use do_shortcode with WooCommerce One Page Checkout
- Hide fields in woocommerce settings
- Help with autofilling field
- woocommerce: Customize email with item total count
- show wc_add notices on particular page in woo commerce custom plugin development
- Custom form data not displaying in cart page?
- best way to handle subscriptions with a licence?
- Is there a request for products plugin for WooCommerce
- woocommerce with external ftp site
- WordPress eMails not working
- Add WooCommerce vendor slug to auto-generated SKU
- Customize plugin templates
- how to make settings page for woocommerce plugin?
- redirect to a custom page
- How can I call functions from a custom plugin?
- Change value of Points earned in product data
- How woo-commerce store Product Data value in DB?
- Need help getting a certain value out of a multi dimensional array
- Which WordPress version to use for improved plugin compatibility? [closed]
- Convert HTML5/CSS3 site to WordPress Theme (need a lot of plugins) or just use the API?
- Trying to disable all notifications except for one on woocommerce checkout page with css [closed]
- Translate text for empty product
- Create Custom Coupon Type
- Add different sizes packaging boxes to orders plugin
- Order custom post type by posts with most likes first