Skip to content

License Security, Cloned Environment Fix, Tabs Navigation, and more!

Compare
Choose a tag to compare
@vovafeldman vovafeldman released this 07 Oct 16:01
· 1067 commits to master since this release

License Security

One of the most useful things that came out of OceanWP’s migration to Freemius was that we discovered some exciting needs for Agency customers. We’ve added 2 new capabilities into the User Dashboard to allow for greater protection of the license purchased by an Agency, including White Label Mode and URL Whitelisting.

From a marketing/sales point of view, these features make your products much more compelling for that special segment of users that are building sites for clients.

Both features are available in a new LICENSE SECURITY section shown when managing licenses:
image

White Label Mode

Agencies and freelancers who work on client projects can hide confidential information about their account and license by flagging a license as White Labeled. This means that Account details normally shown in the Account tab in the WP Admin will not appear when Users check the box that says “This license is activated on my client(s) site(s)”. This addition to the User Dashboard is great for anyone who uses your product as part of their own services. Here’s everything that will be hidden when a license is set as white-labeled:

  • User information
  • Billing details and invoices
  • License key
  • Pricing page
  • Add-on prices (if you sell add-ons)
  • Contact Us page

image

URL Whitelisting

With the new URL whitelisting capability, customers can also control the URLs that can activate their license or continue receiving updates.

image

Cloned Environment – Finally Fixed!

If you’ve been using Freemius for a while, there’s a good chance you already stumbled across the dreaded fatal PHP error: Argument 1 passed to Freemius::get_api_user_scope_by_user() must be an instance of FS_User.

This error has been “haunting” our support for a while, but we’ve never managed to reproduce it on our end. After months of troubleshooting and research, we identified the problem:
The symptom of the error was due to inconsistency in the serialized object types stored in the Database. For some reason, instances of our custom classes, such as the FS_User, were converted into instances of the generic stdClass class.
The error was typically happening after some sort of website cloning (e.g. website migration, staging to production replication, etc.).
The environment was running PHP 7.2 and higher.

With the help of several kind buyers, we got screen recordings of their cloning process, which helped us to reproduce the issue and pinpoint the exact code that was causing the issue (this is one example from BackupBuddy):

if ( is_a( $data, '__PHP_Incomplete_Class' ) ) {
    $serialized_object = serialize( $data );
    $std_class_object  = preg_replace( '/^O:\d+:"[^"]++"/', 'O:' . strlen( 'stdClass' ) . ':"stdClass"', $serialized_object );
    $data              = unserialize( $std_class_object );
}

Due to the way those cloning solutions work the plugins are not included in the cloning execution process, therefore when the options are unserialized and replicated, PHP 7.2+ considers those object instances as __PHP_Incomplete_Class, which is then converted to stdClass and stored incorrectly in the Database.

To make a long story short, we created a workaround by wrapping all the logic that is expected to load instances of our classes from the storage with a helper function that will convert those instances to their corresponding classes in case they are serialized incorrectly as stdClass.

Tabs for Plugin/Theme settings!

With the new SDK release, developers can choose to include Freemius pages in the WP Admin within tabs of plugin or theme settings instead of menu items on the WP side menu. To activate the “tabs” view please include the following line in your WordPress SDK integration snippet:

'navigation' => 'tabs',

New Translations

100% Translated to Tamil – big thanks to Sankar Srinivasan!
76% Translated to Czech – big thanks to vyskoczilova!

Noticeable Bug Fix

After users updated a premium version of a theme from the Updates page in the WP-Admin, it was still showing as if the theme was running a previous version even though the update was successful. This was all due to a cached layer, and the issue is resolved. Thanks to Jesse and Yuli from REI Conversion for bringing it to our attention and helping us test!

Keep Up to Date

You can stay up to date by subscribing to our blog, and you can also check out some of our previous release notes so you can see progress on different Freemius features.

Official release notes: https://freemius.com/blog/white-label-mode-url-whitelisting-user-dev-dashboard-upgrades-coupon-improvements/