The Situation
Say you use the Software Licensing add-on for Easy Digital Downloads, and that you’re selling digital products that are not for WordPress (Software Licensing can parse readme files for WordPress downloads). Since you cannot choose to have Software Licensing parse a readme file to display a change log, you may be using the Change Log field to display a list of changes. The code in this post will allow you to display your change log, saved to the Change Log field, in your posts. It creates a shortcode that will pull the Change Log field for a given EDD download. I covered the process of creating a shortcode to pull custom field data in greater extent if you’re interested.
The Code
This shortcode grabs and returns the content of the _edd_sl_changelog custom field for an EDD product with the ID of whatever you pass in. For example: [edd_changelog download_id="0000"]
. Just remember to change 0000 to the appropriate ID.
Leave a Reply