Disable Freemius in WordPress Plugins

I opted for a solution I had used in the past, which was to override the Freemius SDK global instance that each plugin used to bootstrap their Freemius class.

In the past couple years I have had to disable select features across plugins when working with my enterprise clients. Being enterprise we have always paid for as many services and premium plugins as possible. That being said, some PRO addons/upgrades to some WordPress plugins don’t add enough features to warrant an upgrade.

The Freemium Model

The freemium model is a great option when creating a WordPress plugin. In fact, I’ve been known to use this if a few of my plugins. Some plugins have turned to 3rd party integration services that will allow easy upgrades to their professional counterpart. Freemius has been one the most popular, and you may likely have their SDK code in one or more of the plugins you have installed now.

This past year I have done some digital cleanup, which included updating my Linode server, and bumping all my hosted services and applications that run PHP to 8.2. WordPress has not been known to keep up with newer PHP versions, so plugins aren’t likely to either.

PHP Deprecation Notices

After the upgrade of my apps, my debug logs starting filling up by the thousands. So as part of the digital cleanup I started to removed excess plugin from installations where possible. One of the noisiest were plugins that used the Freemius SDK, so if that plugin could be removed it was. But for those that were needed I opted for a solution I had used in the past, which was to override the SDK global instance that each plugin used to bootstrap their Freemius instance.

Use the following code in your mu-plugins directory. You’ll have to find the variable used for each plugin that calls Freemius. In the example below you can see I am extending the Menu Image plugin.

This should be it (but in case it didn’t work, note not all plugins will use Freemius’ initiation suggestion — You’ll have to look at that plugins code to understand how it bootstraps FS).

Austin
Austin

πŸ’πŸ½β€β™‚οΈ Husband to Jeana.
⚾️ Dodgers & Brewers.
πŸ’» PHP Engineer.
πŸŒπŸΌβ€β™‚οΈGolfer; ~14 HDC.
🌱 Hydroponic Gardner.
🍿 Plex nerd.
πŸš™ '15 WRX, '22 Model 3 LR, & '66 Corvette C2.

Follow me on Twitter @TheFrosty & Instagram @TheFrosty.

Articles: 292

Leave a Reply

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