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]
- WordPress Shipment
- Need to add custom cart item data
- WooCommerce ‘all’ orders no longer being displayed – how may I debug/fix [closed]
- Create WooCommerce Product Category Programmatically
- How can I add a custom header to a custom template in a plugin without using the theme folders
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- WooCommerce Dynamic Cart Pricing
- Custom url structure for custom template
- Can we use a webservice with WordPress?
- How I can get custom field’s current value?
- Override Javascript in a Plugin?
- WordPress automatically removes line break
- (FES EDD) New vendor submission page is blank
- WooCommerce: Building a page with user input which is used to query order status and external API and return a result
- How to add checkboxes for a woocommerce product? [closed]
- Use of Templates in a Plugin
- Why am I getting ( WooCommerce Services could not be installed (Could not create directory.). ) error and how to solve it ?
- how to do login using woocommerce rest api From android
- Every new post/draft has a custom field variable “yst_is_cornerstone” showing
- How to get the particular product quantity in orders in Woocommerce [closed]
- Plugin Admin Menu Boiler Plate
- Custom template for all woo commerce categories
- Is it possible to instantiate a new WC_Cart?
- Sell access to form [closed]
- I want to filter my products with attributes [closed]
- reCAPTCHA on page template without plugin
- Parent Child Custom Fields with Advanced Custom Fields
- Advanced Custom Fields Plugin – Images not displaying
- How to return a specific attribute
- use EDD Content Restriction for restricting php in template
- Is there a way to make [Table Of Content] plugin while not using revision data?
- Visual composer custom element error
- the_posts_pagination() not working if I add wp_head() to header.php
- Plugin which unlock free gift when you reach some amount in cart
- Optimise wordpress database using SQL after deleting registered images from Media Folder
- is there a way to display product gallery images via cdn
- How to assign a specific service to a specific provider based on location
- Object of class WP_Error could not be converted to string in /formatting.php
- If I am not writing a theme, how do I add custom fields to a user for a plugin
- Many to many relationship for variable products
- change product image url in widgets & shop page
- woocommerce blank page after clicking add to cart [closed]
- What method should I use for a sidebar widget that reads latest posts?
- Woocommerce Bookings – Resource needs to be allocated for part of the booking duration, not the whole booking
- Move related products after product summary? [closed]
- How do I add custom fields to the “Edit page” admin screen?
- Visual Composer Data Source?
- Woocommerce disable checkout on specific day
- Display HTML5 jQuery Audio Player On Front Page
- Hook for single product thumbnail
- Woocommerce where to set the Price Suffix [closed]
- Is there a method or plugin to download my products in WooCommerce?
- How to change data format in custom meta box field [closed]
- How to show image caption in Woocommerce gallery
- How to add a static image inbetween the product tiles on main shoppage woocommerce?
- wp_options Table keeps growing
- Brands Filter Not Working For On Sale Products
- Newspaper theme, custom query vars, & custom rewrite rules
- YITH Wishlist plugin displays the same product id for every product [closed]