How to apply Easy Digital Downloads code snippets
You can find a collection of code snippets on our Library page at https://library.easydigitaldownloads.com/
Install the WPCode Plugin
If you are provided with a code snippet to provide a fix or add functionality the best way to apply the snippet is with WPCode. This tutorial will cover how to apply a code snippet using WPCode for your EDD store.
The first thing you need to do is install and activate the free WPCode plugin on your website. For more details, see this guide on how to install a WordPress plugin.
Add Snippet
Upon activation, the plugin will add a new menu item labeled Code Snippets to your WordPress admin bar. Clicking on it will show you a list of all the custom code snippets you have saved on your site.
Since you just installed the plugin, your list will be empty.
Go ahead and click on the Add New button to add your first custom code snippet in WordPress.
This will bring you to the Add Snippet page. Here you can choose a code snippet from the pre-made library or add your custom code.
To add custom code, click on the Use snippet button underneath the ‘Add Your Custom Code (New Snippet)’ option.
You need to start by entering a title for your custom code snippet. This could be anything that helps you identify the code.
After that, you can copy and paste your code snippet into the code box. Be sure to set the Code Type to PHP Snippet for any EDD code snippet that you are adding.
In the Insertion section, confirm Auto Insert and Run Everywhere is seclected.
Save & set Code Snippet to Active.
Your snippet is now active on your site.