Skip to content

Connectivity Test Removal, New Filters, Enhancements & Bug Fixes

Pre-release
Pre-release
Compare
Choose a tag to compare
@vovafeldman vovafeldman released this 13 Feb 15:15
· 182 commits to develop since this release

Connectivity Test Removal

Starting from this version, the WordPress SDK no longer makes a connectivity test (aka ping.json) to the Freemius API upon plugin/theme activation.

This now-obsolete feature, which was initially used to improve user experience (more on that down below) and later proved to be a cause for concern among users, is finally down and out.

For demonstration, I downloaded the latest version of TablePress, which uses Freemius, and manually updated the SDK to 2.5.4. Here’s what happens after activation:

tablepress-activation-with-freemius-sdk 2 5 4

Voilà 🎊 As you can see on Snitch, a plugin that monitors remote requests, no HTTP requests were made after plugin activation.

Why the SDK Had a Connectivity Test (The Backstory)

After launching the WordPress SDK, we quickly discovered that API connectivity could not be taken for granted. Whether it’s related to cURL misconfiguration, HTTPS or OpenSSL issues, firewalls, or regional ISP blockages, servers are sometimes unable to make remote requests.

After researching popular plugins with an opt-in component, we stumbled upon Jetpack. The plugin initiates a connectivity test immediately after activation. You can test it yourself:

jetpack-connectivity-test

Long story short, as this approach enabled us to resolve the challenge we were facing — along with the fact that Jetpack is a super popular plugin with millions of active installs and developed by Automattic — we decided to replicate this approach to make sure we didn’t show the opt-in to users who wouldn’t be able to opt-in anyway due to connectivity issues.

The connectivity test was also useful in identifying clock differences between the WP site and the API server, which is essential for security reasons. This allowed developers to limit the exposure of the SDK — or even turn it off completely — without the need to release a new version.

If you are a developer who has been using the moderation capabilities, make sure to read the next section.

Warning: Breaking Changes

By removing the connectivity test, the moderation capabilities had to be transitioned to SDK settings. So, if you are using the moderation section in the Developer Dashboard to activate Freemius only for new installs or you limit the number of installs, please make sure to add the new config.

So, for example, the settings to only show the opt-in for new installations looks like this:

'opt_in_moderation' => array(
    'new'       => 100,
    'updates'   => 0,
    'localhost' => true,
),
  • 'new' (int | boolean): An integer from 0 to 100 to control the exposure percentage of the opt-in to new product installs. It also supports a boolean value. When set to true, then assume 100% exposure; if set to false, then no exposure at all. Defaults to true (as 100%) when not set.
  • 'updates' (int | boolean): Exactly as the ‘new’ param, but controls the opt-in exposure for product updates (i.e., what % of websites will see the opt-in after upgrading to a new version with the Freemius SDK, when the previous version didn’t include the SDK).
  • 'localhost' (boolean): Whether to show the opt-in on localhost sites. Default's to true if not set.

New Filters

You can now override the in-dashboard checkout URL across the entire SDK by using the 'checkout_url' filter. Or you can use the 'update_notice_checkout_url' to specifically set the checkout URL shown in the admin notice when a license has expired.

Enhancements & Bug Fixes

💡 We have improved the logic determining if WP is executed via an HTTP/S request, which resolves some PHP notices when WordPress gets executed via WP CLI or through an actual server cronjob with define('DISABLE_WP_CRON', true).

💡 Added support for Kinsta's new staging environment URL patterns.

🐞 Fixed the permissions state after upgrading to a paid version in anonymous mode.

🐞 Fixed the in-dashboard affiliate application form submission.

Why a Release Candidate And Not the Final Version?

SDK version 2.5.4 was thoroughly code reviewed and fully tested. While we have high confidence it's production-ready because the change is on the infrastructure level, it's inevitably of a higher risk. Along with the fact that many of the Freemius team are traveling to WordCamp Asia this week (meet us 🤝) and many of us will stay in Thailand for another week of vacation, we decided that it wouldn’t be responsible to release it as a final version before we're back in full capacity at our home offices with strong internet and the proper working environment to react promptly if/as needed.

Call For Testers

Dear Freemius partners, we need your help in testing the release candidate.

If you're using the SDK functions beyond the standard integration snippet, please verify your integration still works as expected.

If you have automated testing, please make sure to run your tests to verify those are still passing ✅ If you don't, you can still help by running sanity testing with the new SDK.

  • Try out the activation experience, preferably both on a regular site and a multisite network.
  • It would be great if you could also test the upgrade flow by replacing the SDK in an already active environment where the plugin/theme is active. If you're extra awesome, give it a try for both a free version of your product and its paid version.

WordCamp Asia 🌴

We're super pumped for WordCamp Asia. The team is flying to Bangkok from four continents 🗺 It’s an exciting opportunity to finally meet fellow “Freemians” face2face 😁 This was something that was planned a long time ago in 2020, but we all know how it ended 🤷‍♂️

We’re looking forward to hanging out with community members, catching up with friends, establishing new connections, and talking to plugin & theme developers and other product makers.

We are also eager to meet with freelancers, agencies, and anyone who’s building websites professionally, as we are looking for feedback on how we can make Freemius even more awesome for professional builders.

With that said…

Reduced Availability Until Feb 26th

Heads up, we're transitioning to maintenance mode for the next two weeks (until Feb 26th). We will keep providing support throughout the entire period, with a focus on pressing issues.