Skip to content

Version 2.12.0#800

Merged
swashata merged 16 commits intomasterfrom
develop
May 11, 2025
Merged

Version 2.12.0#800
swashata merged 16 commits intomasterfrom
develop

Conversation

@swashata
Copy link
Contributor

@swashata swashata commented May 4, 2025

Privacy & PHP Compatibility Improvements

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

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

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.

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.

fajardoleo and others added 14 commits February 10, 2025 00:33
…e-path-calc-enhancement

[starter] [symlink] Symlink SDK relative path "calculation" enhancement.
* Add: unfiltered_site_url;
Add: Scheduled Crons;
Add: Collapsible tables
Fix: Export logs in CSV

PHP compatibility

Formatting

[debug page] Fixed code style, Fixed duplicated header in exported file

Changed toggle script from vanilla JS to jQuery

Toggle button in a variable, class names

Added toggle button factory function

Added border width

Moved css snippet to debug.scss

---------

Co-authored-by: Leo Fajardo <leo@freemius.com>
Changed `exit;` to `return;` in `start.php` to prevent the Freemius SDK
from terminating execution in CLI environments where `ABSPATH` is not defined.
This resolves conflicts with tools like PHPCS, PHPStan, and PHPUnit
while ensuring the SDK remains functional within WordPress.
* [filters] Independent checkout page purchase completed filter.

* [checkout] [filter] [redirect] Add extra action for return without sync + Make the processPurchseEvent promise based for better usability.

---------

Co-authored-by: Swashata Ghosh <swas@freemius.com>
…#792)

* [privacy] Avoid sending first name, last name and email if not needed

* [api] Minor refactoring/cleanup (orphan license check).

---------

Co-authored-by: Leo Fajardo <leo@freemius.com>
#752)

* Added a boolean parameter to get_plan_by_id to avoid calling sync_plans when coming from sync_plan
… by normalizing the calculated path since some environments can return inconsistent slash usages.
* Add class plugin-details-modal to add-on thickbox

* Code conventions
@swashata swashata requested review from fajardoleo and vovafeldman May 4, 2025 06:47
@swashata swashata merged commit db6f35a into master May 11, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants