Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying WooCommerce Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
WooCommerce Cookbook

WooCommerce Cookbook

By : Rauland
3.4 (12)
close
close
WooCommerce Cookbook

WooCommerce Cookbook

3.4 (12)
By: Rauland

Overview of this book

If you have ever built or managed a WordPress site and want to add e-commerce functionality into your site, WooCommerce and this book are perfect for you. Learning how to use WooCommerce through this series of recipes will give you a solid platform to add any future e-commerce needs.
Table of Contents (12 chapters)
close
close
11
Index

Creating a regular expression for a cloaked affiliate link

No one wants to do things hundreds of times. If there's a way you can automate something, you should. This applies when you're uploading thousands of products as well as when you have a ton of affiliate links. If you recommend multiple affiliate links on one site, you can use a pattern-matching technology called regular expressions to create affiliate links on-the-fly. This way, you don't have to create a cloaked link for every single product.

It also makes it very easy to manage affiliate links. Sometimes, affiliate links change due to a change on the vendor's side. When that happens, if you use a regular expression, you only have to change the link in one place. If you have hundreds of affiliate links, you'll have to change each one manually.

Getting ready

You need to have the Redirection plugin installed and know how to create a basic cloaked link. See the preceding recipe, Cloaking an affiliate link, to...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete