Discover in this tutorial how to modify the text of the Easy Digital Downloads purchase button using code.
By default, Easy Digital Downloads displays the text “Purchase” on the button to complete the checkout.
But it’s likely that at some point you’ll want to change it to a call to action that better suits your website and product, right?
An example: when you sell single products and also offer a membership, you want to differentiate them from each other.
If you are subscribing to a membership it is better to make it clear that the payment will be recurring:
Do you want to do something like this? Here’s how to customize that text to your liking:
Snippet to change Easy Digital Downloads checkout button text
Add the following code at the end of functions.php or in your functionality plugin:
To see this and another 1097 code snippets of this website, login or subscribe here.
In this code you use the edd_checkout_button_purchase
filter to modify the text of the Easy Digital Downloads buy button.
Of course, you can customize it to your liking by modifying the product ID and customizing the text with the call to action that suits you best.
In addition, you display the price of the membership and make sure that the text is only changed if there is only one product in the cart, to avoid possible confusions.
Conclusions
Now you know how to customize the Easy Digital Downloads checkout button text with a little bit of code. It’s something fairly simple to implement and allows you to refine the EDD registration/purchase page a bit more.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉