Skip to content

fix(black-friday): treat active_expired licenses as expired - #1398

Open
Soare-Robert-Daniel wants to merge 1 commit into
developmentfrom
fix/bf-active-expired-status
Open

Soare-Robert-Daniel wants to merge 1 commit into
developmentfrom
fix/bf-active-expired-status

Conversation

@Soare-Robert-Daniel

@Soare-Robert-Daniel Soare-Robert-Daniel commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Visualizer Pro users whose licence expired, but is still active on their site, get the free-user Black Friday offer. The status check compared against active-expired, but the SDK and the store send active_expired; the check now accepts both.

Note

The bug was added in 1af67d69 on version v4.0.2 (2026-05-19).

  • Black Friday notice — an active_expired licence now gets the expired offer: "Your Visualizer Pro features are still here, just locked. Renew at a reduced rate this week." with a Reactivate now button. Before, it got the free-user offer, and the link had no expired=1.

Note

active-expired stays in the check. The test-black-friday helper still writes that value.

QA

You need a test site with Visualizer and Visualizer Pro, and no other ThemeIsle product. The SDK shows one Black Friday notice per site, so another product can replace this one.

Add this file to force the 2026 sale window:

<?php
// wp-content/mu-plugins/bf-qa.php
add_filter( 'themeisle_sdk_current_date', function () {
	return new DateTime( '2026-11-27 12:00:00' );
} );
  1. Create a key with the status Active Expired in the dummy licence generator. Activate it:

    wp visualizer activate <key>

    Expect: this command prints active_expired:

    wp eval 'echo apply_filters( "product_visualizer_license_status", false );'
  2. Go to WP Admin → Dashboard.

    Expect: the Black Friday notice says "Your Visualizer Pro features are still here, just locked. Renew at a reduced rate this week." The button says Reactivate now.

  3. Hover the Reactivate now button.

    Expect: the link starts with https://themeisle.link/vizualizer-bf and contains expired=1.

  4. Go to WP Admin → Plugins.

    Expect: the Pro plugin row shows the red link Black Friday Sale - 50% off.

  5. Deactivate the key with wp visualizer deactivate <key>, then go to WP Admin → Dashboard.

    Expect: the notice shows the free-user offer, with a title that ends in "60% off this week".

Refs Codeinwp/themeisle#2097

🤖 Generated with Claude Code

The SDK reports expired-but-active licenses as `active_expired`, but the
check only matched `active-expired`, so these users got the free offer.
Accept both values.

Refs Codeinwp/themeisle#2097

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Soare-Robert-Daniel
Soare-Robert-Daniel marked this pull request as ready for review October 27, 2026 16:48
@pirate-bot

Copy link
Copy Markdown
Contributor

Plugin build for 3161661 is ready 🛎️!

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.

2 participants