Skip to content

Releases: Freemius/wordpress-sdk

New License Lifecycle Hooks, Checkout Customization, and InstaWP Support

11 Nov 07:52
3cbe98b

Choose a tag to compare

We are releasing version 2.13.0 of the Freemius WordPress SDK, introducing several enhancements and new developer-focused features.

License Lifecycle Hooks

Two new action hooks have been added to help developers manage license lifecycle events:

  • after_license_activation: Triggered after a license is successfully activated.
  • after_license_deactivation: Triggered after a license is successfully deactivated.

These can be used along with the existing after_license_change hook to perform custom actions when a license's status changes. This is particularly helpful if you maintain your own license management system and need to keep it in sync with Freemius.

You can read more about all supported hooks and filters in our documentation.

Payments Now Show the Gross Amount

Previously, we showed the Net amount in the payments list within the Accounts page, excluding taxes. This sometimes caused confusion in regions where taxes apply.

payment-table

To address this, the payments list now displays the Gross amount, including all applicable taxes, giving a clearer picture of the total transaction value.

New Filter to Customize Checkout Parameters

We've added a new filter checkout/parameters that allows you to customize the checkout parameters.

For example, to force-show the social proofing UI with the billing cycle selector in the Checkout:

my_fs()->add_filter( 'checkout/parameters', function() {
    return array(
        'show_refund_badge'      => true,
        'show_reviews'           => true,
        'billing_cycle_selector' => 'dropdown',
    );
} );

With this filter, the Checkout will load with the corresponding UI.

checkout-customized

Please note that not all parameters can be customized — some may still be overridden by your pricing page configuration. We recommend using this only when generating a custom pricing page or checkout links.

Updated Pricing Page

We've included version 1.3.0 of the pricing page app, which brings the following improvements:

  1. Fixed a bug related to calculating the largest annual discount.
  2. Improved the security and social proofing badges.
pricing-page

If you're not using a custom pricing page, no action is needed. If you are, please review the new release on GitHub to update your fork.

Support for New InstaWP Staging Environment

We now fully support the new InstaWP staging environment. The plugin will automatically switch to safe mode when used in cloned environments. You can read more about it in our documentation.

Enhanced Multisite Performance, Along with Various Messaging Enhancements Across the UI

15 Sep 14:44
241fbfc

Choose a tag to compare

We are releasing version 2.12.2 of our SDK with various bug fixes and performance improvements.

Multisite Enhancements

  • Optimized site-activated plugins caching for faster load times.
  • Streamlined individual site detail handling for improved performance.

UI and Messaging

  • Improved activation admin notice wording for better readability.
  • Improved deactivation feedback dialog with clearer subscription cancellation messaging.
  • Polished account page styling with minor CSS improvements.
  • Fixed missing premium theme badge for themes using custom premium slugs.
  • Enhanced API status label on the debug page for clarity.

Other Notable Changes

  • Resolved a PHP 8.2 deprecation warning for better compatibility.
  • Fixed showing of pending plans on the pricing page when in development mode.

Fixes for Update Caching, Cron Jobs, and Skype Cleanup

06 Jul 13:28
fedeba0

Choose a tag to compare

We’re releasing version 2.12.1 of the Freemius WordPress SDK, focusing purely on bug fixes and cleanup tasks.

Fix: Caching Issue in Update Check

We identified a regression affecting the caching mechanism of our auto-update system. In certain scenarios, the cache was bypassed, leading to unnecessary API calls and performance hits. This has now been fixed.

As a bonus, we made some performance improvements by reducing the amount of data fetched from our API during the update check process.

Removal: Skype Support

With Microsoft sunsetting Skype, we’ve removed the support_skype property from our SDK. The property is no longer referenced in any SDK logic.

Our backend systems have already been updated so that even older versions of the SDK will no longer show it. This release removes redundant checks and references to clean up the codebase.

Other Notable Changes

  • The cron hook system is now implemented following WordPress best practices, ensuring improved compatibility across the plugin ecosystem. Thanks to @johnbillion for the contribution.
  • The SDK readme now links to our official list of supported hooks and filters.
  • Fixed a bug on the pricing page where the compliance flag for WordPress.org support was incorrectly calculated.

Integration, PHP Compatibility & Privacy Improvements

11 May 07:09
db6f35a

Choose a tag to compare

Version 2.12.0 is out with a strong focus on integration, PHP compatibility & privacy. Here’s a breakdown of what’s new:

Improved PHP 8+ Compatibility

We’ve completed another round of improvements for PHP 8+ compatibility, especially targeting PHP 8.3 and 8.4. This is part of our ongoing effort to support modern PHP versions while still maintaining compatibility with PHP 7.0 — the current minimum required by WordPress. If you run into any PHP-related issues, please report them to us.

Improved Composer Integration

Thanks to community feedback, we’ve made two key improvements to our Composer support:

  1. Our main loading file start.php no longer breaks in CI/CD pipelines or while running tests.
  2. We now export the composer.json file from our Git repository, allowing for manual package installations.

Update Pricing Page App

The embedded pricing page app has been updated.

sdk-pricing-page

This version includes a fix where, if no annual discount is available, the UI will correctly hide it instead of showing a meaningless “0” discount.

Enhanced checkout/purchaseCompleted Filter

Following wp.org guidelines, we transitioned our Checkout flow from an iFrame to a redirect-based or fullscreen approach. In the process, the checkout/purchaseCompleted filter was inadvertently broken.

This version not only restores the filter but also enhances it by supporting Promises. Example usage:

my_fs()->add_filter('checkout/purchaseCompleted', function () {
    return <<<JS
function (data) {
    return fetch(myPlugin.ajaxUrl, {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        body: JSON.stringify({
            action: 'my_plugin_purchase_completed',
            data: data,
            nonce: myPlugin.nonce,
        }),
    });
}
JS;

The UI will now wait for the AJAX request to complete before redirecting. For most use cases, however, we recommend using a beacon request.

New Filter: is_pricing_page_visible

You can now control the visibility of the SDK-generated pricing page via the new is_pricing_page_visible filter. This is especially useful if you’d like to hide our default pricing page and instead display a custom one.

Check out the full details in our documentation.

Privacy-Friendly License Activation Flow

It came to our attention that during license activation flow, our SDK was sending the WordPress user's email address and the name. While we didn't do anything with this data in our server, and it was only required for orphaned licenses, we understand it can be seen as a privacy issue.

Starting from version 2.12.0, this data will no longer be sent.

In case of orphaned licenses, the SDK will now prompt for the user’s consent before proceeding with activation.

license-activation-conscent

Debug Page UI Improvements

freemius-sdk-debug-page

We’ve revamped the Debug page UI for better usability:

  • All sections are now collapsible.
  • Information is grouped logically into segmented sections.
  • Additional diagnostics have been added to help us debug more efficiently.

Other Bug Fixes

  • Improved loading animations on the Add-ons listing page.
  • Fixed file path-related notices on Windows hosts.
  • Resolved an edge case where hidden plans could cause an infinite loop.
  • Updated internal libraries.

Improved premium version upgrade handling, custom parent menu slug for tabs, PHP 8.2 compatibility & UI fixes

09 Feb 07:12
9ad5477

Choose a tag to compare

We are glad to announce the immediate availability of v2.11.0 of our SDK. Please read below for the details.

Support for custom parent menu slug for tabs

Traditionally, our SDK had the integration option to add menu items with tabs to the admin.php slug. But we realized that in some cases, the plugin developer would want to add custom menu items under custom post types or under completely custom parents, for example, WooCommerce or Gravity Forms.

image

So we introduced a new filter enable_cpt_advanced_menu_logic, which when enabled, will try to detect the parent slug smartly, instead of assuming it to be admin.php. To use it, simply add this after the integration code:

my_fs()->add_filter( 'enable_cpt_advanced_menu_logic', '__return_true' );

Right now we consider this feature beta, hence it is put behind the custom filter. Once we have tested it across many use cases, we will consider removing the filter.

Improved premium version upgrade process

We noticed a regression in the upgrade process of premium versions, where if the SDK location was changed, the WordPress UI would show an error message. While this did not break any functionality, it caused confusion among the users. This has now been fixed.

If you want to change the SDK location, please stay tuned as we release documentation on how to do that properly, without causing errors.

Improvements to the SDK’s latest version detection mechanism

Our SDK comes with a mechanism where it loads the latest version of itself for all plugins and themes which are using Freemius. With the recent changes to support composer and auto-loading, we noticed a small regression for PHP 8.2, where some notice or, in some cases, a fatal error could be thrown. The issue has been fixed.

Other changes

  • The pricing page app is updated to the latest version which reduces the bundle size.
  • All known PHP 8.2-related issues have been resolved.
  • Some UI appearance has been improved.

Composer Support, Parallel Free/Premium Activation, Pricing Page Update, and Various Fixes

12 Dec 06:15
5f57de9

Choose a tag to compare

We are glad to announce v2.10.1 of our WordPress SDK. This version introduces several improvements and bug fixes. Please find the details below.

⚠️ IMPORTANT: DO NOT CHANGE SDK LOCATION YET

While you'll read that this version supports SDK from being loaded from the vendor directory through composer, please do not change the SDK location of your existing product yet. We discovered it will likely cause some error messages to be shown in the update UI.

This issue only affects premium products changing SDK location, not new or free versions. While the "error message" does not break anything, it still gives bad UX, hence, we ask not to change the location of the SDK yet.

We are already working on a solution and will update you soon. We hugely appreciate your understanding and patience in this regard.

Composer Support

We recognize the growing need for Composer-based installations, especially since many modern plugins and themes use this dependency manager. To enhance developer experience (DX), we now officially support Composer.

You can install our SDK with the following command:

composer require freemius/wordpress-sdk

Then, require the Composer autoloader file:

require_once __DIR__ . '/vendor/autoload.php';

Our SDK will work out of the box without any further modifications.

Note for symlinked plugins:

If you are symlinking any freemius powered plugin to the wp-content/plugins directory, which uses composer auto-loading,
please note that the directory name must match with the original directory. For example ln -s ../../awesome-plugin ./awesome-plugin will work, but ln -s ../../awesome-plugin ./some-other-name will not work.

Parallel Activation of Both Free and Premium Versions

Historically, our SDK supported activating either the Free or the Premium version of a WordPress plugin. It also included a mechanism to automatically deactivate the free version when the premium version was activated.

However, some use cases require both free and premium versions to remain active, particularly to collect better statistics from WordPress.org.

Previously, we introduced the deactivate_on_activation filter to modify this behavior. However, it wasn't a complete solution and could lead to bugs in scenarios like bulk plugin activation or updates on WordPress Multisite networks.

We've now completed this feature by introducing a new initialization code. To use this feature, add the following code to your fs_dynamic_init call:

$my_fs = fs_dynamic_init( [
    // ... existing configuration options.
    'parallel_activation' => [
        'enabled'                  => true,
        'premium_version_basename' => 'premium-slug/filename.php',
    ],
] );

With this code, the SDK will:

  1. Avoid deactivating the free version during premium version activation (unless specifically modified by the deactivate_on_activation filter).
  2. Automatically show the license activation page if the free version does not have a license activated.

More information can be found here. If you encounter any issues using this feature, please contact our support team.

Pricing Page Update

pricing-page-1 1 0

The SDK now includes v1.1.0 of the pricing page app. Based on community feedback, we've introduced the following enhancements:

  • Added the pricing/show_annual_in_monthly filter to control how annual billing cycle pricing is displayed.
  • Introduced the plugin_icon filter to override the image displayed on the page.
  • Added the pricing/disable_single_package filter to control the rendering of single-plan products.
  • Introduced the pricing/css_path filter to add custom CSS to the pricing page.

More details can be found in the README file of the pricing page repository.

Additionally, we've fixed the following issues:

  1. The "Lifetime" tab was incorrectly displayed in some cases. This has been resolved.
  2. The "Free" plan was mistakenly rendered with an "Upgrade" button, even when it was the current plan. This has been fixed.
  3. The current plan was not properly highlighted in some scenarios. This has been corrected.

WordPress Playground support

We’re excited to share that the new SDK version officially supports WordPress Playground! When a playground environment is detected, the SDK will automatically run in anonymous mode, skipping the opt-in process to provide a seamless and engaging demo experience.

But that’s not all! The SDK also detects other popular sandbox/playground platforms, like InstaWP and TasteWP, and enables anonymous mode automatically to streamline the setup process even further.

Other bug fixes and enhancements

  • Improved heuristics for cron-based syncing of license and install entities to avoid performance issues, especially on Multisite networks.
  • Fixed an edge-case JavaScript issue that caused the license activation dialog to fail in some scenarios.
  • Updated staging site URL pattern for Kinsta.

Pricing page 2.0, fullscreen Checkout experience and WordPress.org compliance update

21 Oct 10:30
5669671

Choose a tag to compare

Version 2.9.0 comes with various improvements and updates to provide a better experience for your users and stay compliant with the latest wp.org guidelines.

✨ Freemius Pricing Page 2.0

pricing-page-wp-sdk

Our new pricing page is officially out of beta and now bundled into the SDK! This updated version is fully responsive and open source. It supports more pricing use cases to better fit your needs. Check it out: Freemius Pricing Page on GitHub.

Breaking Change

With the removal of the iFrame-based pricing page, any custom CSS you’ve added through the Developer Dashboard will no longer work.

We understand the breaking nature of this update. While we’re working to bring back easy customizability, for now, there are two ways you can customize the CSS or the pricing app itself.

1: Using filters to modify the CSS and variables

The pricing page uses the same structure of CSS variables as our checkout. You can leverage the templates/pricing.php filter to print some inline CSS to modify the style.

For example:

my_fs()->add_filter('templates/pricing.php', function ( $template ) {
	$style = <<<'CSS'
<style>
#fs_pricing_app {
	--fs-ds-blue-10: #ECEFF1;
	--fs-ds-blue-100: #CFD8DC;
	--fs-ds-blue-200: #B0BEC5;
	--fs-ds-blue-300: #90A4AE;
	--fs-ds-blue-400: #78909C;
	--fs-ds-blue-500: #607D8B;
	--fs-ds-blue-600: #546E7A;
	--fs-ds-blue-700: #455A64;
	--fs-ds-blue-800: #37474F;
	--fs-ds-blue-900: #263238;
}
</style>
CSS;

	return $style . $template;
});

Please note that the CSS variables need to be applied on the #fs_pricing_app container.

2: Replacing the entire app

You can follow the instructions outlined here to replace the pricing page application with a custom build of yours.

In the near future, we will provide you with an easier way to modify the styles of the built-in application.

🛒 Fullscreen Checkout Experience

fullscreen-checkout

We’ve made the checkout experience even cleaner! When checking out, users are now redirected to the new fullscreen checkout version, reducing distractions while maintaining the natural and seamless user experience you’re used to. After a successful purchase, your users will be redirected back to the WP Admin, the license will auto-activate, and they’ll see a notification with a download link to the paid version.

📬 Improved In-Dashboard Contact Form

If you’re using the in-dashboard contact form, it will now open in a new tab as a full-screen view. This change along with the others, aligns us with the latest WordPress.org guidelines—say goodbye to all iFrames in the SDK!

⚡ Improved API caching

We noticed some API request caching could consume a significant amount of memory. We have now optimized the system to not cache API requests with large amounts of data.

Fixed regression with license ownership chage

19 Sep 15:56
cc31279

Choose a tag to compare

We noticed a regression from version 2.8.0, in which the system could fail to change license ownership from the UI. We have fixed this regression.

Improved Debugger, WP & PHP 8.2 Compatibility, and Various Bug Fixes

11 Sep 13:26
227cbff

Choose a tag to compare

We are excited to release version 2.8.0, which includes multiple bug fixes and improvements. Please find the details below:

Improved Debugger

persistent-freemius-debugger

The Freemius SDK has a built-in debugger that, when enabled, stores all logs in the local WordPress database. We've received reports that users sometimes forget to disable it, causing the storage size to grow. To prevent this, we now automatically disable the debugger 24 hours after it is turned on.

auto-off-debugger

Please note: this feature will only function if the WordPress instance has cron jobs enabled.

Improved Update Mechanism

We noticed a regression in the latest version of WordPress where updating a premium plugin via the plugin information dialog was not functioning correctly. This issue has now been resolved.

freemius-upgrade-dialog

Additionally, we fixed a case where a premium-only plugin mistakenly fetched data from WordPress.org. This issue could occur if the plugin shared the same slug as another WordPress.org plugin.

Other Bug Fixes and Improvements

  • Enhanced overall PHP 8.2 compatibility.
  • Removed unused styles and fixed various CSS glitches.
  • Added empty index.php files to directories that were missing them.
  • Modified the pricing_url filter to also change the pricing/upgrade submenu item.
  • Added URLs from wpengine, instawp, and 10web to the supported list of staging sites.

Fixed the escaping in the account template

07 Aug 14:13
2741ba2

Choose a tag to compare

Version 2.7.4 is a patch release where we fixed an incorrect usage of an escaping function inside a template.