Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/smtnc-1933-remove-stellar-sale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
significance: patch
type: tweak
entry: Removed the Stellar Sale promotional banner.
timestamp: 2026-08-04T16:08:44.000Z
6 changes: 3 additions & 3 deletions docs/Admin/conditional-content/conditional-logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ class Black_Friday extends Promotional_Content_Abstract {
Use `Has_Targeted_Creative_Upsell` when you want to show specific ads based on context and missing plugins:

```php
class Stellar_Sale extends Promotional_Content_Abstract {
class Summer_Sale extends Promotional_Content_Abstract {
use Has_Datetime_Conditions;
use Is_Dismissible;
use Requires_Capability;
use Has_Targeted_Creative_Upsell;

protected string $slug = 'stellar-sale';
protected string $slug = 'summer-sale';

protected function get_suite_creative_map(): array {
return [
Expand Down Expand Up @@ -501,4 +501,4 @@ class My_Promo extends Promotional_Content_Abstract {
For questions or issues, refer to:

- [Tests](../../../../tests/wpunit/Common/Admin/Conditional_Content/) for usage examples
- Existing implementations: `Black_Friday.php`, `Stellar_Sale.php`
- Existing implementations: `Black_Friday.php`
6 changes: 1 addition & 5 deletions src/Common/Admin/Conditional_Content/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Conditional Content Controller.
*
* @since 6.3.0
* @since TBD Removed the Stellar Sale promotional content.
*/
class Controller extends Provider_Contract {

Expand All @@ -34,7 +35,6 @@ public function register() {
}

$this->container->singleton( Black_Friday::class, Black_Friday::class, [ 'hook' ] );
$this->container->singleton( Stellar_Sale::class, Stellar_Sale::class, [ 'hook' ] );

$this->hooks();
}
Expand All @@ -61,7 +61,6 @@ protected function hooks(): void {
public function plugins_loaded(): void {
// Those need to be initialized here in order for their hooks to be registered.
tribe( Black_Friday::class );
tribe( Stellar_Sale::class );

$plugin = Common::instance();

Expand Down Expand Up @@ -89,7 +88,6 @@ public function render_header_notice( $page = null ): void {
return;
}

tribe( Stellar_Sale::class )->render_header_notice();
tribe( Black_Friday::class )->render_header_notice();
}

Expand Down Expand Up @@ -141,7 +139,6 @@ public function add_sidebar_sections( $sections, $sidebar ): array {
*/
protected function get_promotional_classes(): array {
return [
Stellar_Sale::class,
Black_Friday::class,
];
}
Expand All @@ -154,7 +151,6 @@ protected function get_promotional_classes(): array {
* @return void
*/
public function render_help_hub_sidebar(): void {
tribe( Stellar_Sale::class )->render_sidebar_content();
tribe( Black_Friday::class )->render_sidebar_content();
}
}
229 changes: 69 additions & 160 deletions src/Common/Admin/Conditional_Content/Stellar_Sale.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Stellar Sale Promo Conditional Content.
*
* @since 6.8.2
* @deprecated TBD The Stellar Sale promotion has been retired.
*
* @package TEC\Common\Admin\Conditional_Content;
*/
Expand All @@ -17,21 +18,24 @@
};
use Tribe\Utils\Date_I18n;

_deprecated_file( __FILE__, 'TBD', '', 'The Stellar Sale promotion has been retired.' );

/**
* Set up for Stellar Sale promo.
*
* The promotion has been retired and its creatives removed, so every method
* here returns an inert value and the banner never renders. The class is kept
* only so that anything still resolving it keeps working.
*
* @since 6.8.2
* @since 6.9.8 Modified to use the Has_Datetime_Conditions trait instead of extending the Datetime_Conditional_Abstract class.
* @since 6.9.8 Modified to use the Requires_Capability trait.
* @since 6.9.8 Modified to use the Has_Targeted_Creative_Upsell trait.
* @since 6.9.8 Modified to use the Is_Dismissible trait.
* @deprecated TBD The Stellar Sale promotion has been retired.
*/
class Stellar_Sale extends Promotional_Content_Abstract {
Comment thread
dave-green-uk marked this conversation as resolved.
use Has_Datetime_Conditions {
get_start_time as get_start_time_from_trait;
get_end_time as get_end_time_from_trait;
should_display as should_display_datetime;
}
use Has_Datetime_Conditions;
use Is_Dismissible;
use Requires_Capability;
use Has_Targeted_Creative_Upsell;
Expand Down Expand Up @@ -79,221 +83,126 @@ class Stellar_Sale extends Promotional_Content_Abstract {
protected string $background_color = '#1c202f';

/**
* @inheritdoc
* Sale name for display.
*
* @since 6.8.2
* @deprecated TBD The Stellar Sale promotion has been retired.
*
* @return string Always an empty string.
*/
protected function get_sale_name(): string {
return __( 'Stellar Sale', 'tribe-common' );
_deprecated_function( __METHOD__, 'TBD' );

return '';
}

/**
* @inheritdoc
* Register actions and filters.
*
* @since 6.8.2
* @deprecated TBD The Stellar Sale promotion has been retired.
*
* @return void
*/
public function hook(): void {
// Register AJAX dismiss handler from Is_Dismissible trait.
add_action( 'wp_ajax_tec_conditional_content_dismiss', [ $this, 'handle_dismiss' ] );
_deprecated_function( __METHOD__, 'TBD' );
}

/**
* @inheritdoc
* Link URL for the promotional content.
*
* @since 6.8.2
* @deprecated TBD The Stellar Sale promotion has been retired.
*
* @return string Always an empty string.
*/
protected function get_link_url(): string {
return 'https://evnt.is/stellarsale25';
_deprecated_function( __METHOD__, 'TBD' );

return '';
}

/**
* Override to set time to 4:00 AM UTC.
* Start of the display window.
*
* @since 6.8.2
* @deprecated TBD The Stellar Sale promotion has been retired.
*
* @return ?Date_I18n
* @return ?Date_I18n Always null.
*/
protected function get_start_time(): ?Date_I18n {
$date = $this->get_start_time_from_trait();
if ( null === $date ) {
return null;
}
_deprecated_function( __METHOD__, 'TBD' );

return $date->setTime( 4, 0 );
return null;
}

/**
* Override to set time to 4:00 AM UTC.
* End of the display window.
*
* @since 6.8.2
* @deprecated TBD The Stellar Sale promotion has been retired.
*
* @return ?Date_I18n
* @return ?Date_I18n Always null.
*/
protected function get_end_time(): ?Date_I18n {
$date = $this->get_end_time_from_trait();
if ( null === $date ) {
return null;
}
_deprecated_function( __METHOD__, 'TBD' );

return $date->setTime( 4, 0 );
return null;
}

/**
* @inheritdoc
* Determines if the promotional content should be displayed.
*
* @since 6.8.2
* @deprecated TBD The Stellar Sale promotion has been retired.
*
* @return bool Always false.
*/
protected function should_display(): bool {
// Check if hidden by filter.
if ( tec_should_hide_upsell( $this->get_slug() ) ) {
return false;
}
_deprecated_function( __METHOD__, 'TBD' );

// Check user capability (from Requires_Capability trait).
if ( ! $this->check_capability() ) {
return false;
}

// Check if user dismissed (from Is_Dismissible trait).
if ( $this->has_user_dismissed() ) {
return false;
}

// Check datetime conditions (from Has_Datetime_Conditions trait).
if ( ! $this->should_display_datetime() ) {
return false;
}

// Don't show if there are no upsell opportunities.
return $this->has_upsell_opportunity();
return false;
}

/**
* Check if Event Tickets Plus Seating is licensed and active.
*
* @since 6.8.3
* @deprecated TBD The Stellar Sale promotion has been retired.
*
* @return bool Whether Seating is licensed and active.
* @return bool Always false.
*/
public static function check_seating_license(): bool {
try {
$service = tribe( \TEC\Tickets\Seating\Service\Service::class );
} catch ( \Exception $e ) {
return false;
}

// Get service status from the Seating Service.
$service_status = $service->get_status();
_deprecated_function( __METHOD__, 'TBD' );

// If service status doesn't exist, seating is not active.
if ( empty( $service_status ) ) {
return false;
}

// Check if the license is valid (not invalid and has a license).
return ! ( $service_status->has_no_license() || $service_status->is_license_invalid() );
return false;
}

/**
* @inheritdoc
* Map of creatives keyed by suite and plugin.
*
* @since 6.8.2
* @deprecated TBD The Stellar Sale promotion has been retired.
*
* @return array Always an empty array.
*/
protected function get_suite_creative_map(): array {
return [
'events' => [
'events-calendar-pro/events-calendar-pro.php' => [
'image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_slug() . '/ecp-top-wide.png', false, null, \Tribe__Main::instance() ),
'narrow_image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_slug() . '/ecp-top-narrow.png', false, null, \Tribe__Main::instance() ),
'link_url' => 'https://evnt.is/ecpsale',
'alt_text' => sprintf(
/* translators: %1$s: Sale year (numeric), %2$s: Sale name */
_x( '%1$s %2$s - Get Events Calendar Pro at 30%% off!', 'Alt text for the Events Pro Sale Ad', 'tribe-common' ),
date_i18n( 'Y' ),
$this->get_sale_name()
),
],
'the-events-calendar-filterbar/the-events-calendar-filter-view.php' => [
'image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_slug() . '/fbar-top-wide.png', false, null, \Tribe__Main::instance() ),
'narrow_image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_slug() . '/fbar-top-narrow.png', false, null, \Tribe__Main::instance() ),
'link_url' => 'https://evnt.is/filtersale',
'alt_text' => sprintf(
/* translators: %1$s: Sale year (numeric), %2$s: Sale name */
_x( '%1$s %2$s - Get Filter Bar at 30%% off!', 'Alt text for the Filter Bar Sale Ad', 'tribe-common' ),
date_i18n( 'Y' ),
$this->get_sale_name()
),
],
'default' => [
'image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_wide_banner_image(), false, null, \Tribe__Main::instance() ),
'narrow_image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_narrow_banner_image(), false, null, \Tribe__Main::instance() ),
'link_url' => $this->get_link_url(),
'alt_text' => sprintf(
/* translators: %1$s: Sale year (numeric), %2$s: Sale name */
_x( '%1$s %2$s for The Events Calendar plugins, add-ons and bundles.', 'Alt text for the Default Sale Ad', 'tribe-common' ),
date_i18n( 'Y' ),
$this->get_sale_name()
),
],
],
'tickets' => [
'event-tickets-plus/event-tickets-plus.php' => [
'image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_slug() . '/etp-top-wide.png', false, null, \Tribe__Main::instance() ),
'narrow_image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_slug() . '/etp-top-narrow.png', false, null, \Tribe__Main::instance() ),
'sidebar_image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_slug() . '/etp-sidebar.png', false, null, \Tribe__Main::instance() ),
'link_url' => 'https://evnt.is/ticketsplus',
'alt_text' => sprintf(
/* translators: %1$s: Sale year (numeric), %2$s: Sale name */
_x( '%1$s %2$s - Get Event Tickets Plus at 30%% off!', 'Alt text for the Event Tickets Plus Sale Ad', 'tribe-common' ),
date_i18n( 'Y' ),
$this->get_sale_name()
),
],
'seating-check' => [
'callback' => [ __CLASS__, 'check_seating_license' ],
'image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_slug() . '/seating-top-wide.png', false, null, \Tribe__Main::instance() ),
'narrow_image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_slug() . '/seating-top-narrow.png', false, null, \Tribe__Main::instance() ),
'sidebar_image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_slug() . '/seating-sidebar.png', false, null, \Tribe__Main::instance() ),
'link_url' => 'https://evnt.is/seatingsale',
'alt_text' => sprintf(
/* translators: %1$s: Sale year (numeric), %2$s: Sale name */
_x( '%1$s %2$s - Get Event Seating at 30%% off!', 'Alt text for the Event Seating Sale Ad', 'tribe-common' ),
date_i18n( 'Y' ),
$this->get_sale_name()
),
],
'default' => [
'image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_wide_banner_image(), false, null, \Tribe__Main::instance() ),
'narrow_image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_narrow_banner_image(), false, null, \Tribe__Main::instance() ),
'sidebar_image_url' => tribe_resource_url( 'images/conditional-content/' . $this->get_sidebar_image(), false, null, \Tribe__Main::instance() ),
'link_url' => $this->get_link_url(),
'alt_text' => sprintf(
/* translators: %1$s: Sale year (numeric), %2$s: Sale name */
_x( '%1$s %2$s for The Events Calendar plugins, add-ons and bundles.', 'Alt text for the Default Sale Ad', 'tribe-common' ),
date_i18n( 'Y' ),
$this->get_sale_name()
),
],
],
];
_deprecated_function( __METHOD__, 'TBD' );

return [];
}

/**
* Get the alt text for the creative.
*
* @since 6.9.8
* @deprecated TBD The Stellar Sale promotion has been retired.
*
* @return string The alt text.
* @return string Always an empty string.
*/
protected function get_creative_alt_text(): string {
$creative = $this->get_selected_creative();

if ( ! empty( $creative['alt_text'] ) ) {
return $creative['alt_text'];
}

// Fallback to default behavior.
$year = date_i18n( 'Y' );
$sale_name = $this->get_sale_name();
_deprecated_function( __METHOD__, 'TBD' );

return sprintf(
/* translators: %1$s: Sale year (numeric), %2$s: Sale name */
esc_html__(
'%1$s %2$s for The Events Calendar plugins, add-ons, and bundles.',
'tribe-common'
),
$year,
$sale_name
);
return '';
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading