Localization Logic, Affiliation Form, Bug Fixes
Localization Logic
We are excited to share that we revamped our localization mechanism to avoid loading all SDK's translatable strings into the memory on every request. This will significantly reduce the memory consumption - only the used strings will be loaded into the memory. We kept the mechanism the enables overriding every single string in the SDK, making the text fully customizable.
IMPORTANT
Please notice that we're deprecating the localization method __fs()
since PHP7 throws a warning if there are functions/methods starting with two underscores. Please check your plugin/theme's code, if you're using this function, please replace it with __()
(your own translations).
Affiliation
Added a conditional affiliation program onboarding form:
If you already set up an affiliation program for your product on Freemius, simply go to the SDK INTEGRATION section, scroll to the submenu items selection option, and make sure that the Affiliation checkbox is checked:
Then, copy the new SDK snippet code and place it in your plugin/theme instead of the previous snippet. You'll notice a new parameter that will look like:
'has_affiliation' => '<moderation>', // <moderation> - selected, customers, or all.
You can learn more about affiliation here:
https://freemius.com/blog/affiliate-program-wordpress-plugins-themes/
Bug Fixes
- The payments history and invoices download functionality was fixed.
- Fixed the activation logic for plugins without any admin setting pages (nor menu items).
- Fixed the opt-in auto installation logic for add-ons.
- Fixed the download button on the Account page. Some PHP environments were generating invalidly escaped querystring when using
http_build_query()
. We replaced it withurl_encode()
which fixed the problem. - Improved the symlink-related logic for some edge cases.
- All paths are now stored as relative. Even though we had a special logic to identify patch changes, some edge cases were breaking the logic.
Theme Check Compatibility
Stopped using @inet_pton()
and @json_decode()
since warnings silencing flagged as an error by the new Theme Check. Replaced inet_pton()
with filter_var()
and FILTER_VALIDATE_IP
for the IP validation. Removed the @
from json_decode()
.
Reference: https://themes.trac.wordpress.org/ticket/46134#comment:14