How can I prevent a plugin from updating unless it’s minimum PHP version is met?

I have a plugin distributed on WordPress.org that is fairly popular. I have to drop support for PHP 5.2and I’d like to at least drop support for PHP 5.2, but if I could make the minimum PHP 5.4, late static bindings and useful closures, would be great.

Before you say PHP7, keep in mind that plugin only has 100,000+ sites running it. For all WordPress sites, 10% fo sites are on PHP 5.3 or below. I am not risking breaking 10k sites.

We will be adding a PHP minimum version header, but this does not, on a programatic level, do anything yet.

I am looking for the right pattern to consistently short-circuit updates of my plugin unless the PHP version requirement is set. Does anyone have a bullet-proof way of doing this?

Read more here:: How can I prevent a plugin from updating unless it’s minimum PHP version is met?

Leave a Reply

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