Skip to content

SMTNC-1933: Remove the Stellar Sale conditional content - #2966

Open
dave-green-uk wants to merge 6 commits into
release/M26.lanturnfrom
smtnc-1933-remove-stellar-sale-2026-from-tec-and-et-common
Open

SMTNC-1933: Remove the Stellar Sale conditional content#2966
dave-green-uk wants to merge 6 commits into
release/M26.lanturnfrom
smtnc-1933-remove-stellar-sale-2026-from-tec-and-et-common

Conversation

@dave-green-uk

@dave-green-uk dave-green-uk commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🎫 Ticket

SMTNC-1933

🗒️ Description

Retires the Stellar Sale conditional content in Common.

Why it resurfaced. Stellar_Sale was date-bound to July 29thAugust 5th with no year pinned, so the window re-opened every year. get_slug() resolves to stellar-sale-<current year>, but the creatives only ever shipped under stellar-sale-2025/. From 2026 onward the banner still passed its date check and rendered — with image URLs pointing at a directory that doesn't exist. That's what showed up while building the maintenance release.

What changes:

src/Common/Admin/Conditional_Content/Stellar_Sale.php deprecated, not deleted — see below
src/Common/Admin/Conditional_Content/Controller.php singleton registration, plugins_loaded() init, header notice, promotional class list, help hub sidebar
src/resources/images/conditional-content/stellar-sale-2025/ 13 creatives
src/resources/postcss/.../_main.pcss .tribe-notice-stellar-sale and .tribe-notice-stellar-sale-2024
tests / docs the unused $stellar_sale fixture, a filter cleanup, and doc references

The class is deprecated, not removed (review feedback — small chance a third party still resolves it). Every method emits _deprecated_function() and returns an inert value:

method returns
should_display() false
hook() no-op — registers nothing
get_suite_creative_map() []
get_sale_name() / get_link_url() / get_creative_alt_text() ''
get_start_time() / get_end_time() null
check_seating_license() false

should_display() returning false is what stops every render path in Promotional_Content_Abstract — header notice, both banners, both sidebars and the tickets settings section all early-return. The traits stay in place so the inherited public API (is_dismissible(), handle_dismiss(), check_capability(), …) survives for anyone calling it. File-level _deprecated_file() follows the existing pattern in Datetime_Conditional_Abstract.php.

What deliberately stays:

  • Has_Targeted_Creative_Upsell — still used by the deprecated class, and it's the documented counterpart to Has_Generic_Upsell_Opportunity for the next targeted campaign.
  • Tribe\Admin\Notice\Marketing\Stellar_Sale — a separate, older _deprecated_file() stub from 6.3.0, unrelated to this one.
  • Black_Friday — untouched and still rendering through all the same entry points.

CSS note — every removal is scoped. Diffing resolved selector chains before/after: 767 → 730, 37 removed, 0 of them outside a .tribe-notice-stellar-sale* ancestor. All 31 removed .tribe-marketing-notice* rules sit under &.tribe-notice-stellar-sale or &.tribe-notice-stellar-sale-2024, so nothing can regress unless it renders Stellar Sale markup. The seven generic .tribe-marketing-notice* blocks (L1401–L1596) are untouched.

The markup that used these classes — src/admin-views/notices/tribe-stellar-sale.php — was deleted in 2955ac045 (2024-10-10); its classes map 1:1 to the removed block. Compiled CSS lives in the gitignored build/, so there's no built asset in this diff.

🔍 Consumer impact

Checked The Events Calendar, Event Tickets and Events Calendar Pro. No companion PRs needed — none of them reference Stellar_Sale, the stellar-sale slug, or its hooks anywhere outside their bundled common/ checkout. Every Stellar match in those repos is the Strauss-prefixed TEC\Common\StellarWP\… vendor namespace. The change reaches them through the usual submodule bump.

They do use the Conditional Content system, but only via paths this change leaves intact:

  • tribe( Black_Friday::class )->render_narrow_banner_html() in both welcome messages
  • do_action( 'tec_conditional_content_header_notice' ) — hook and contract unchanged, still answered by the Controller
  • TEC's Events_Pro_Upsell (Is_Dismissible) and ET's Inline_Upsell

One thing worth a reviewer's eye. Stellar_Sale::hook() is now a no-op, so nothing in Common registers wp_ajax_tec_conditional_content_dismiss any more. That is not a regression:

  • Nothing left in Common renders a dismiss button — Black_Friday isn't dismissible, Inline_Upsell is explicitly not dismissible, and Notifications uses its own wp_ajax_ian_dismiss endpoint and markup. The endpoint and the markup that used it disappear together.
  • TEC's Events_Pro_Upsell registers its own handler and is self-contained.
  • Is_Dismissible::handle_dismiss() early-returns on $this->get_slug() !== $slug, so registrants never handled each other's dismissals in the first place.

Also drops a small layering wart: check_seating_license() used to reach from Common into ET's TEC\Tickets\Seating\Service\Service; it now returns false without touching ET at all.

Versioning: patch. Deprecating rather than removing the class means this is no longer an API break, so it can ride in the maintenance release as intended.

🎥 Artifacts

n/a — this removes UI rather than adding it.

✔️ Checklist

  • Ran npm run changelog to add changelog file(s). More info here
  • Code is covered by NEW wpunit or integration tests. — n/a; the deprecated class has no behaviour left to cover
  • Code is covered by EXISTING wpunit or integration tests. — Promotional_Content_Test and the trait tests still cover Black_Friday and the traits. Not run locally; leaving the suite to CI.
  • Are all the required tests passing?
  • Automated code review comments are addressed.
  • Have you added Artifacts?
  • Check the base branch for your PR. — branched from main
  • Add your PR to the project board for the release.

📋 Follow-ups (not in this PR)

Flagging rather than fixing, to keep the diff surgical:

  1. The remaining marketing-notice CSS looks dead too. .notice-tribe-banner and the seven generic .tribe-marketing-notice* rules have no markup generating them in this repo, TEC, ET or ECP. Deliberately left alone: unlike the removals above they aren't scoped to anything Stellar-Sale-specific, so removing them needs a check against the premium plugins (ETP, Filter Bar, Community, Promoter…) that I couldn't grep here. Worth its own ticket.
  2. src/views/v2/components/icons/stellar-icon.php is now unreferenced. It's a theme-overridable template, so removing it is a separate call.

The Stellar Sale banner was date-bound to "July 29th" - "August 5th" with
no year pinned, so it re-fired every year. Its slug resolves to
stellar-sale-<current year> while the creatives only exist under
stellar-sale-2025, so from 2026 onward it rendered with broken image URLs.

Removes the class, its creatives, the Controller wiring, and the dead
pre-6.3 marketing-notice CSS that styled the older versions of the banner.

The Has_Targeted_Creative_Upsell trait stays - it is the documented
counterpart to Has_Generic_Upsell_Opportunity and is covered by its own
tests.

SMTNC-1933
@linear-code

linear-code Bot commented Aug 4, 2026

Copy link
Copy Markdown

SMTNC-1933

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9421bb49-afbe-4abf-95ef-bd3dc68f75dc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Summary by CodeRabbit

  • Removed
    • Removed the Stellar Sale promotional banner from the admin.
    • Removed related banner styling and promotional content.
  • Documentation
    • Updated conditional-content examples and references to use the Summer Sale example.
  • Tests
    • Updated promotional-content coverage to reflect the remaining Black Friday promotion.

Walkthrough

This PR removes the Stellar Sale promotional content feature. The Controller no longer registers, initializes, or renders Stellar Sale, leaving Black Friday as the only promotional content class. The Stellar_Sale class file and its associated styles are deleted. Tests, documentation, and changelog entries are updated accordingly.

Changes

Stellar Sale Removal

Layer / File(s) Summary
Controller registration and rendering cleanup
src/Common/Admin/Conditional_Content/Controller.php
Removes Stellar Sale service registration, initialization, header notice, class listing, and sidebar rendering, leaving Black Friday as the sole registered promotional content class.
Test suite updates for Black Friday only
tests/wpunit/Common/Admin/Conditional_Content/Promotional_Content_Test.php, tests/wpunit/Common/Admin/Conditional_Content/Traits/Trait_Integration_Test.php
Removes the Stellar Sale import, test property, setup, and filter cleanup. Updates test comments to reference Black Friday only.
Documentation and changelog updates
docs/Admin/conditional-content/conditional-logic.md, changelog/smtnc-1933-remove-stellar-sale-class.yaml, changelog/smtnc-1933-remove-stellar-sale.yaml
Renames the documentation example from Stellar_Sale to Summer_Sale, removes Stellar_Sale.php from the implementation list, and adds changelog entries for the class and banner removal.

Sequence Diagram(s)

sequenceDiagram
  participant Plugin
  participant Controller
  participant BlackFriday

  Plugin->>Controller: register()
  Controller->>BlackFriday: register service
  Plugin->>Controller: init()
  Controller->>BlackFriday: initialize
  Controller->>BlackFriday: render header notice
  Controller->>BlackFriday: render sidebar
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and specifically summarizes the main change: removing the Stellar Sale conditional content class from the codebase.
Description check ✅ Passed The description is comprehensive and addresses all template sections. It includes ticket reference, detailed explanation of changes, rationale, consumer impact analysis, and a completed checklist.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch smtnc-1933-remove-stellar-sale-2026-from-tec-and-et-common

Comment @coderabbitai help to get the list of available commands.

@dave-green-uk dave-green-uk self-assigned this Aug 4, 2026
@dave-green-uk
dave-green-uk changed the base branch from main to release/M26.lanturn August 4, 2026 16:25
Removing the public Stellar_Sale class is an API change, so it belongs in
a minor rather than a patch.
Comment thread changelog/smtnc-1933-remove-stellar-sale-class.yaml Outdated
Comment thread changelog/smtnc-1933-remove-stellar-sale-class.yaml Outdated
Comment thread changelog/smtnc-1933-remove-stellar-sale.yaml Outdated
Comment thread src/Common/Admin/Conditional_Content/Stellar_Sale.php
dave-green-uk and others added 4 commits August 4, 2026 17:56
Co-authored-by: Dimitrios Pantazis <dpanta94@gmail.com>
Review feedback: keep the class in place on the small chance a third party
still resolves it. Every method now emits a deprecation notice and returns
an inert value, so the banner never renders and nothing fatals.

should_display() returning false is what stops every render path in
Promotional_Content_Abstract; the traits stay so the inherited public API
survives intact.

Creatives, Controller wiring, dead CSS, test and doc references stay
removed as before.

Changelog significance back to patch - deprecating rather than removing
the class means this is no longer an API break.

SMTNC-1933
One customer-facing entry is enough for this change; the class deprecation
is developer detail that belongs in the PR description.
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