A few days back I got a tutorial request from one of my website visitor asked this question by using the Request tutorial page, so that I am writing this tutorial. Below is the complete question he asked:
Follow the below step to redirect the custom Affiliate link when clicked on Add to Cart button in WooCommerce product archive page & single product page.
Download the WooCommerce Improved External Products WordPress plugins from wordpress.org and install in your website.
If you have just started with WordPress, check out:
After the installation, click on Activate button to enable the plugin features and then follow the below instructions.
Step 1) Login to WordPress dashboard and navigate to the edit product page and move the product configuration section. Select the External/Affiliate product option from the Product Data drop-down menu.
Step 2) Now enter the Affiliate product link, button text, regular price, and sale price and update the product. Always try to use the relevant button text, so that your visitors will not confused. you can use like Buy on Amazon.
Now open the product from front-end website, you will see the button Buy on Amazon and it will be redirected to your external affiliate link.
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.