Appreciation Earth Email Email_2 Group_2

Setting the Required PHP Version for a Premium WordPress Plugin with Easy Digital Downloads

December 20, 2020 WordPress

Back in 2017, WordPress added a new header that plugin authors could use in their plugin’s readme.txt file. ‘Requires PHP’ can be used to specify a minimum required PHP version for their plugin.

Initially WordPress didn’t show updates for those plugins where the PHP version didn’t meet the required plugin version, and later added a notice to the plugins table about the problem:

For premium plugins this isn’t possible without some custom work. I sell premium addons for WP User Manager using the Easy Digital Downloads plugin with the Software Licensing addon, and although you can configure lots of data that would normally be in the readme.txt such as the description, tested up to version, screenshots etc, you can’t yet specify the Requires PHP version.

So I’ve put together a small plugin that enables you to set the required PHP version for your premium WordPress plugins with Easy Digital Download.

Check it out https://github.com/polevaultweb/edd-sl-requires-php and download the zip here.

Once installed the edit download page has a new ‘Minimum PHP Version Required’ setting in the Download readme.txt metabox:

This version is then passed to the plugin info API response to your customer’s sites, so WordPress can check if the PHP version is compatible.

I hope this get’s rolled into the Software Licensing addon soon, but for now – I hope it helps you. Let me know if you have any issues.

Iain Building and growing WordPress products. I'm the product manager of ACF at WP Engine. I also develop plugins like WP User Manager and Intagrate. I write about the WordPress ecosystem over at WP Trends.
Comments