Change the button text for free downloads in Easy Digital Downloads

This tutorial will show you how you can change the button text for free downloads in Easy Digital Downloads

This code snippet will show you how you can change the button text of a free download in Easy Digital Downloads. By default it shows Free – Add to Cart which sometimes is not ideal.

The default button text for free downloads

The default button text for free downloads
The default button text for free downloads

Our new button text for free downloads

Our new button text for free downloads
Our new button text for free downloads

Copy and paste the following function (mind the opening PHP tag) into your child theme’s functions.php or custom plugin. Change the $free_download_text variable on the first line of the function to what you’d like your button to say for free downloads.

There’s also a plugin version if you prefer.

Leave a Reply

Your email address will not be published. Required fields are marked *