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
- Possible to overwrite load_template function in plugin using functions.php
- Implement Autocomplete for a custom field on WordPress Plugin Frontend
- How to query the custom fields by language?
- Add a captcha form to the woocommerce register form
- List Category Posts rewrite necessitates rewrite of customised templates
- How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met
- Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
- How to enable specific plugin only based around shop manager role?
- What are wsm tables for?
- WordPress automatically removes line break
- Why required field not working in Country dropdown in WooCommerce –
- Woocommerce API HTTP Response 401
- 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]
- woocommerce_package_rates not fired when wordpress woocommerce accessed as non ajax
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- How to use WP-CLI / WC-CLI to bulk import 1000s of products (variable and simple)?
- Add woocommerce variation images in gallery?
- woocommerce payment gateway callback not firing [closed]
- How to modify WCMP Rest API response?
- Fetch Children of Grouped Products Inside WooCommerce Product Loop
- WordPress Keeps Logging Out – What Tests Can I Run to Solve This?
- Woocommerce dependent plugin
- How to check current user before all actions and filters?
- New databes tables with – WooCommerce – for developers [closed]
- (FES EDD) New vendor submission page is blank
- Plugin-generated pages use Not Found or Pages Archive templates?
- Modifying a .js Function for Print [QZ Tray, WooCommerce POS]
- WooCommerce: Building a page with user input which is used to query order status and external API and return a result
- woocommerce product countdown not showing in variable product? [closed]
- auto populate list of questions if user select a category xyz
- Change commission_status paid when withdraw_status vendor is completed
- I want to disable Cash on delivery based on product tag in woocommerce Checkout Page [closed]
- Is there a way to create custom product templates based on category on WooCommerce?
- is there a way to link one of the field in ACF field group, to a field in a media attachment page? [closed]
- Woocommerce Deposit, then random payments until product paid in full [closed]
- custom payment gateway in woocommerce failed to connect to remote api server
- Programmatically Process Order through WooCommerce/Stripe Payment Gateway [closed]
- Replacing a plugin function with a custom renamed function doesn’t work
- 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]
- Multiple Billing forms in WooCommerce (one billing form per product)
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- Change Product Addon price based on select Variation
- WooCommerce – Maximum qty per line per product
- How to create an input field, and base the output on spreadsheet data? [closed]
- Woocommerce Create custom product type with variations
- Facebook Messager Plugin
- Remove /product/ from url. I want only category name then product name
- Pre booking doesn’t work with custom bootstrap modul in woocommerce [closed]
- WooCommerce specifc variations for specific user role [closed]
- Save custom attributes of product in woocommerce
- Filtering WooCommerce Orders by Category
- Advanced Custom Field DatePicker [closed]
- trying to get product category image in woo-coomerce
- 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 ?