Skip to content

Comments

fix: black friday for 2025#997

Merged
Soare-Robert-Daniel merged 9 commits intodevelopmentfrom
fix/bf-2025
Nov 5, 2025
Merged

fix: black friday for 2025#997
Soare-Robert-Daniel merged 9 commits intodevelopmentfrom
fix/bf-2025

Conversation

@Soare-Robert-Daniel
Copy link
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel commented Nov 4, 2025

All Submissions:

Changes proposed in this Pull Request:

  • Modified the Black Friday logic to use the SDK flag for detection.
  • Modified the messages.
  • Added monthly to yearly update path vis support contact.
  • Added unit tests.

Note

Like in the last year, the big banner is dimissable while the one in sidebar is not.

Closes https://github.com/Codeinwp/optimole-service/issues/1625

How to test the changes in this Pull Request:

  1. Change the date to Black Friday (You can use this tool (https://github.com/Soare-Robert-Daniel/test-black-friday)
  2. Free users should see the cupon in the banner.
  3. Pro users should not see the banner.
CleanShot 2025-11-05 at 15 53 29@2x

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Note

The global notice integration will be skipped based on https://github.com/Codeinwp/optimole-service/issues/1625#issuecomment-3486542201

Translations

Here are the translation changes:

  • msgid "25 Nov - 03 Dec" has been removed in favor of wp_data native translation.

Note

Some existing string like Private sale are not translated (reference)

@Soare-Robert-Daniel Soare-Robert-Daniel self-assigned this Nov 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Black Friday promotional campaign for 2025, replacing hardcoded 2024 dates with dynamic date calculations based on the current year and extending promotional offers to monthly plan users.

Key changes:

  • Dynamic Black Friday date calculation instead of hardcoded 2024 dates
  • New promotional strategy targeting both free and monthly plan users with differentiated offers
  • Integration with ThemeIsle SDK's Black Friday framework

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
inc/admin.php Updated Black Friday promotion logic with dynamic dates, monthly plan support, SDK integration, and new helper methods
tests/test-admin.php Comprehensive test suite covering all Black Friday notice scenarios including plan-specific logic and date boundaries
phpstan-baseline.neon Removed PHPStan baseline entry for get_bf_notices() method type specification
assets/src/dashboard/parts/connected/index.js Simplified banner visibility logic to support all eligible plan types

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review November 4, 2025 15:27
@pirate-bot
Copy link
Collaborator

pirate-bot commented Nov 4, 2025

Plugin build for 8e159f2 is ready 🛎️!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

inc/admin.php:718

  • The tsdk_translate_link() call on line 714 is redundant since add_query_arg() on line 718 will modify the URL returned from tsdk_translate_link(). If tsdk_translate_link() adds query parameters, they may interfere with the email parameter. Consider calling tsdk_translate_link() after all query args are added, similar to line 1609 where tsdk_translate_link() wraps self::get_upgrade_base_link().
		$base_url = tsdk_translate_link( $base_url );
		$email    = self::get_account_email();

		if ( ! empty( $email ) ) {
			$base_url = add_query_arg( 'email', base64_encode( $email ), $base_url );

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Soare-Robert-Daniel
Copy link
Contributor Author

@selul is PR is final for review

@Soare-Robert-Daniel Soare-Robert-Daniel merged commit 063d888 into development Nov 5, 2025
11 checks passed
@Soare-Robert-Daniel Soare-Robert-Daniel deleted the fix/bf-2025 branch November 5, 2025 14:35
@pirate-bot
Copy link
Collaborator

🎉 This PR is included in version 4.1.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants