Releases: Freemius/wordpress-sdk
Fixed regression with license ownership chage
Improved Debugger, WP & PHP 8.2 Compatibility, and Various Bug Fixes
We are excited to release version 2.8.0, which includes multiple bug fixes and improvements. Please find the details below:
Improved 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.
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.
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
, and10web
to the supported list of staging sites.
Fixed the escaping in the account template
Version 2.7.4 is a patch release where we fixed an incorrect usage of an escaping function inside a template.
Fix opt-in moderation issue with API connectivity and UI glitches
Version 2.7.3 is a patch release which has the following fixes:
- We noticed an edge case that can happen due to API connectivity issue during opt-in moderation. This was causing license sync cronjobs to fail in some cases. We have identified and fixed it.
- We noticed a UI glitch in the deactivation modal. We have fixed it.
Fixed expired license notice issue, API caching, and minor UI improvements
We are releasing Version 2.7.2 of our WordPress SDK with bug fixes and UI enhancements.
Remove sticky notice when an expired license is extended
We show a sticky notice in the UI if the license is expired.
However, the product owner can extend the license from the Freemius Developer Dashboard. In such cases, we were not clearing the sticky notice. We have made improvements to clear it automatically from now on. The user needs to simply click on the "Sync" button on the "Accounts" page to make it happen.
Fixed issue in API caching
We noticed an edge case issue in the API caching layer. Sometimes, the cache would indefinitely fall back to the last valid response instead of expiring after a certain time. This was affecting the staged rollout feature. We have fixed this issue.
UI text improvements
We noticed we were using some strings in some parts of the UI that were not properly capitalized and translated. We have made fixes for the same.
Note: We have removed v2.7.1
from the release as it contained a fatal bug. If you're using v2.7.1, we urge that you upgrade ASAP.
Improved license white-labeling, enhanced PHP 8 support and various housekeeping
Version 2.7.0 brings various improvements and bug fixes. Please find them below:
Improved license white-labeling
The license keys will no longer be printed in the HTML form. This enhances the experience of white-labeled licenses.
PHP 8.* enhancements
- We noticed some translated languages broke the placeholders used in
printf
family of functions. We have fixed the translations directly in our Transifex project. - We have added some annotations in the source code to suppress some dynamic property-related issues, happening on extreme edge cases.
- Lifetime add-on license was also triggering PHP 8.1 deprecation notice in some cases. This issue was fixed as well.
Garbage Collector enhancements
We discovered an edge case where the garbage collector could delete data, in case the slug of the product was changed from the Freemius Developer Dashboard. We have introduced a fix for this.
Other bug fixes & housekeeping
- The SDK now properly checks for connectivity state when multiple Freemius-powered plugins or themes are used.
- In some cases, the SDK would promote "hidden" plans for trials. This has now been fixed.
- Fixed the incorrect signature of the
fs_enqueue_local_script
function. - We have improved the asset (CSS & JS) build process to be used against the latest NodeJS LTS.
- We have fixed the
gettext
extractor library to work for various types of custom gettext functions used in the project. - We have created another system to upload pot files from our SDK directly to our Transifex project and then update the
po
andmo
files.
For the build-tooling changes, please see the new CONTRIBUTING.md file.
Enable garbage collector by default
Starting v2.6.2 we have enabled the garbage collector system by default. More information about it can be found here.
If for some reason you want to explicitly disable it (for example, while you are developing something locally), you can do so by defining this constant in your wp-config.php
file.
// Disable Freemius WP-SDK Garbage Collector
if ( ! defined( 'WP_FS__ENABLE_GARBAGE_COLLECTOR' ) ) {
define( 'WP_FS__ENABLE_GARBAGE_COLLECTOR', false );
}
The Garbage Collector will run once every day and will clear data of any plugins/themes that have not been active for more than 1 week.
You can configure the expiration time with another constant:
// Set expiration time to 30 days
if ( ! defined( 'WP_FS__GARBAGE_COLLECTOR_EXPIRATION_TIME_SECS' ) ) {
define( 'WP_FS__GARBAGE_COLLECTOR_EXPIRATION_TIME_SECS', ( 30 * 24 * 60 * 60 ) );
}
Additionally, we also identified and fixed a typo in the logic which could have caused a regression in the GC logic.
Fix block theme preview issue on WP 6.3.2 and above
We identified (thanks to the community) that our temporary patch to fix the block theme preview issue for WP versions 6.3 and 6.3.1 had regressions for WP version 6.3.2 and above.
Since the original issue itself was a bug from the WordPress core that has now been fixed, we have scoped our fix for the specific WP 6.3 and 6.3.1 versions. We plan to remove the patch altogether after a few months when the usage is low enough. This ensures we continue supporting WP 6.3, 6.3.1, and 6.3.2+ versions.
New Garbage Collector system and various bug fixes
We are pleased to announce the release of v2.6.0 of our WP SDK, of which the main highlight is the new Garbage Collector system. You can find more details below.
Garbage Collector
Following our efforts to reduce the storage space required by the Freemius SDK, we’ve introduced a Garbage Collector system. The system will proactively check for inactive products and will clean their data from the storage.
Since this is a new beta feature, it is currently opt-in only. To turn on the system, you need to define the following constant before you load the Freemius integration code:
if ( ! defined( 'WP_FS__ENABLE_GARBAGE_COLLECTOR' ) ) {
define( 'WP_FS__ENABLE_GARBAGE_COLLECTOR', true );
}
It can be placed inside the main plugin file or functions.php
of a theme before the require
of Freemius SDK.
By default, the Garbage Collector will run once every day and will clear data of any plugins/themes that have not been active for more than 1 week.
You can configure the expiration time with another constant:
// Set expiration time to 30 days
if ( ! defined( 'WP_FS__GARBAGE_COLLECTOR_EXPIRATION_TIME_SECS' ) ) {
define( 'WP_FS__GARBAGE_COLLECTOR_EXPIRATION_TIME_SECS', ( 30 * 24 * 60 * 60 ) );
}
We invite the community to enable this on their product and help us test it in the wild. Please note that:
- Enabling the Garbage Collector in one product will result in it being activated for all Freemius products in the same WordPress instance.
- Since the initial activation of the Garbage Collector system, all inactive data will stay for
WP_FS__GARBAGE_COLLECTOR_EXPIRATION_TIME_SECS
time before being deleted. - In the next release, we will make the Garbage Collector system activated by default.
Fix conflict between new block theme loader
We found an issue in WP 6.3 where previewing a block theme became broken. We’ve identified the root cause and have included a fix.
Fixed retrieval of affiliate email address
If the user hadn’t opted in, we relied on the application form to determine their email. There was an error in the system that didn’t account for the email address from the form. This has been fixed.
Fixes of PHP 8.2 related notice
We found an edge case where configuring the navigation
with tabs
could trigger a PHP notice. Similarly, we found another use case in which the site is configured with relative URLs that could trigger another kind of PHP notice while trying to parse the URL. We’ve identified the causes and have included a fix.
License activation link in the duplication website notice
We found a regression where the license activation link in the duplication website notice (clone resolution) wasn’t working. We fixed it and also improved the UX to show a spinner while the system is working.
Fixed update notice issue when free and premium versions of a plugin is running in parallel
We discovered an edge case in our SDK when a plugin's free and premium version needs to be running in parallel. In some cases, the updates from the premium version would show up under the Free version, causing confusion.
The SDK v2.5.12 fixes the issue.