SMTNC-1933: Remove the Stellar Sale conditional content - #2966
SMTNC-1933: Remove the Stellar Sale conditional content#2966dave-green-uk wants to merge 6 commits into
Conversation
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
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis 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. ChangesStellar Sale 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
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Removing the public Stellar_Sale class is an API change, so it belongs in a minor rather than a patch.
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.
🎫 Ticket
SMTNC-1933
🗒️ Description
Retires the Stellar Sale conditional content in Common.
Why it resurfaced.
Stellar_Salewas date-bound toJuly 29th→August 5thwith no year pinned, so the window re-opened every year.get_slug()resolves tostellar-sale-<current year>, but the creatives only ever shipped understellar-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.phpsrc/Common/Admin/Conditional_Content/Controller.phpplugins_loaded()init, header notice, promotional class list, help hub sidebarsrc/resources/images/conditional-content/stellar-sale-2025/src/resources/postcss/.../_main.pcss.tribe-notice-stellar-saleand.tribe-notice-stellar-sale-2024$stellar_salefixture, a filter cleanup, and doc referencesThe 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:should_display()falsehook()get_suite_creative_map()[]get_sale_name()/get_link_url()/get_creative_alt_text()''get_start_time()/get_end_time()nullcheck_seating_license()falseshould_display()returningfalseis what stops every render path inPromotional_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 inDatetime_Conditional_Abstract.php.What deliberately stays:
Has_Targeted_Creative_Upsell— still used by the deprecated class, and it's the documented counterpart toHas_Generic_Upsell_Opportunityfor 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-saleor&.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 in2955ac045(2024-10-10); its classes map 1:1 to the removed block. Compiled CSS lives in the gitignoredbuild/, 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, thestellar-saleslug, or its hooks anywhere outside their bundledcommon/checkout. EveryStellarmatch in those repos is the Strauss-prefixedTEC\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 messagesdo_action( 'tec_conditional_content_header_notice' )— hook and contract unchanged, still answered by the ControllerEvents_Pro_Upsell(Is_Dismissible) and ET'sInline_UpsellOne thing worth a reviewer's eye.
Stellar_Sale::hook()is now a no-op, so nothing in Common registerswp_ajax_tec_conditional_content_dismissany more. That is not a regression:Black_Fridayisn't dismissible,Inline_Upsellis explicitly not dismissible, andNotificationsuses its ownwp_ajax_ian_dismissendpoint and markup. The endpoint and the markup that used it disappear together.Events_Pro_Upsellregisters 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'sTEC\Tickets\Seating\Service\Service; it now returnsfalsewithout 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
npm run changelogto add changelog file(s). More info herewpunitorintegrationtests. — n/a; the deprecated class has no behaviour left to coverwpunitorintegrationtests. —Promotional_Content_Testand the trait tests still coverBlack_Fridayand the traits. Not run locally; leaving the suite to CI.main📋 Follow-ups (not in this PR)
Flagging rather than fixing, to keep the diff surgical:
.notice-tribe-bannerand 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.src/views/v2/components/icons/stellar-icon.phpis now unreferenced. It's a theme-overridable template, so removing it is a separate call.