diff --git a/changelog/smtnc-1933-remove-stellar-sale.yaml b/changelog/smtnc-1933-remove-stellar-sale.yaml new file mode 100644 index 0000000000..d5f9fa7356 --- /dev/null +++ b/changelog/smtnc-1933-remove-stellar-sale.yaml @@ -0,0 +1,4 @@ +significance: patch +type: tweak +entry: Removed the Stellar Sale promotional banner. +timestamp: 2026-08-04T16:08:44.000Z diff --git a/docs/Admin/conditional-content/conditional-logic.md b/docs/Admin/conditional-content/conditional-logic.md index 66590ad618..a93b331741 100644 --- a/docs/Admin/conditional-content/conditional-logic.md +++ b/docs/Admin/conditional-content/conditional-logic.md @@ -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 [ @@ -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` diff --git a/src/Common/Admin/Conditional_Content/Controller.php b/src/Common/Admin/Conditional_Content/Controller.php index b42864b34f..344d4462f5 100644 --- a/src/Common/Admin/Conditional_Content/Controller.php +++ b/src/Common/Admin/Conditional_Content/Controller.php @@ -18,6 +18,7 @@ * Conditional Content Controller. * * @since 6.3.0 + * @since TBD Removed the Stellar Sale promotional content. */ class Controller extends Provider_Contract { @@ -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(); } @@ -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(); @@ -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(); } @@ -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, ]; } @@ -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(); } } diff --git a/src/Common/Admin/Conditional_Content/Stellar_Sale.php b/src/Common/Admin/Conditional_Content/Stellar_Sale.php index 80343ecd0e..f9568df491 100644 --- a/src/Common/Admin/Conditional_Content/Stellar_Sale.php +++ b/src/Common/Admin/Conditional_Content/Stellar_Sale.php @@ -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; */ @@ -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 { - 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; @@ -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 ''; } } diff --git a/src/resources/images/conditional-content/stellar-sale-2025/ecp-top-narrow.png b/src/resources/images/conditional-content/stellar-sale-2025/ecp-top-narrow.png deleted file mode 100644 index 2ee897c3e5..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/ecp-top-narrow.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/ecp-top-wide.png b/src/resources/images/conditional-content/stellar-sale-2025/ecp-top-wide.png deleted file mode 100644 index ad0f093439..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/ecp-top-wide.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/etp-sidebar.png b/src/resources/images/conditional-content/stellar-sale-2025/etp-sidebar.png deleted file mode 100644 index a4fe3c629f..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/etp-sidebar.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/etp-top-narrow.png b/src/resources/images/conditional-content/stellar-sale-2025/etp-top-narrow.png deleted file mode 100644 index 8633a8b383..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/etp-top-narrow.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/etp-top-wide.png b/src/resources/images/conditional-content/stellar-sale-2025/etp-top-wide.png deleted file mode 100644 index d70928018f..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/etp-top-wide.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/fbar-top-narrow.png b/src/resources/images/conditional-content/stellar-sale-2025/fbar-top-narrow.png deleted file mode 100644 index 9c29b4bf9e..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/fbar-top-narrow.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/fbar-top-wide.png b/src/resources/images/conditional-content/stellar-sale-2025/fbar-top-wide.png deleted file mode 100644 index 31d73ebc03..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/fbar-top-wide.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/seating-sidebar.png b/src/resources/images/conditional-content/stellar-sale-2025/seating-sidebar.png deleted file mode 100644 index 4a682111f0..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/seating-sidebar.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/seating-top-narrow.png b/src/resources/images/conditional-content/stellar-sale-2025/seating-top-narrow.png deleted file mode 100644 index 9387a05a6e..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/seating-top-narrow.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/seating-top-wide.png b/src/resources/images/conditional-content/stellar-sale-2025/seating-top-wide.png deleted file mode 100644 index 65f3be7c16..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/seating-top-wide.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/sidebar.png b/src/resources/images/conditional-content/stellar-sale-2025/sidebar.png deleted file mode 100644 index 560e57e234..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/sidebar.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/top-narrow.png b/src/resources/images/conditional-content/stellar-sale-2025/top-narrow.png deleted file mode 100644 index 0d7db952cd..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/top-narrow.png and /dev/null differ diff --git a/src/resources/images/conditional-content/stellar-sale-2025/top-wide.png b/src/resources/images/conditional-content/stellar-sale-2025/top-wide.png deleted file mode 100644 index 792e1d276f..0000000000 Binary files a/src/resources/images/conditional-content/stellar-sale-2025/top-wide.png and /dev/null differ diff --git a/src/resources/postcss/tribe-common-admin/_main.pcss b/src/resources/postcss/tribe-common-admin/_main.pcss index 8e4ef7c45d..deec276ef2 100644 --- a/src/resources/postcss/tribe-common-admin/_main.pcss +++ b/src/resources/postcss/tribe-common-admin/_main.pcss @@ -1499,50 +1499,6 @@ a.tribe-rating-link { } } - &.tribe-notice-stellar-sale { - - .tribe-marketing-notice { - min-height: 50px; - } - - .tribe-marketing-notice__content { - align-content: center; - display: flex; - flex-wrap: wrap; - justify-content: center; - margin: auto; - } - - .tribe-marketing-notice__icon { - align-self: baseline; - height: 20px; - margin: auto 14px auto 0; - width: 13px; - - .tribe-common-c-svgicon--stellar-icon { - - circle { - stroke: #fff; - } - } - } - - .tec-stellar-sale-text { - fill: #fff; - height: 16px; - margin: unset; - margin-top: 0.25em; - stroke: #fff; - width: 176px; - } - - h3 { - font-weight: 400; - margin: auto 8px auto 14px; - text-align: center; - } - } - h3 { color: #fff; display: block; @@ -1655,213 +1611,6 @@ a.tribe-rating-link { justify-content: flex-start; margin: 0 0 16px 0; padding-right: 0; - - &.tribe-notice-stellar-sale-2024 { - background-color: #1d202f; - overflow: hidden; - - @media screen and (max-width: 767px) { - padding: 20px 20px 0; - } - - a { - color: #d8ff00; - text-transform: uppercase; - - &:active, - &:focus, - &:hover { - color: #e6b1fc; - } - } - - .tribe-marketing-notice { - max-width: 100%; - } - - .notice-dismiss { - - &::before { - content: "X"; - font-family: inherit; - font-size: 30px; - font-weight: 300; - position: absolute; - right: 20px; - top: 20px; - } - } - - .tribe-marketing-notice__content-wrapper { - align-items: center; - display: flex; - flex-wrap: wrap; - font-family: "Neurial Grotesk", sans-serif; /* todo: enqueue font */ - padding: 35px 0 10px 35px; - width: 100%; - - @media screen and (max-width: 480px) { - align-items: flex-start; - flex-direction: column; - padding: 30px 0 10px; - } - - @media (min-width: 768px) and (max-width: 1023px) { - padding: 30px 0 10px 25px; - } - - h3, - h4 { - color: #fff; - } - - h3 { - font-size: 24px; - font-weight: 700; - margin: 0; - text-align: left; - } - - h4 { - font-size: 18px; - font-weight: 300; - margin: 10px 0 25px; - text-align: left; - - @media screen and (max-width: 480px) { - margin: 10px 0 5px; - } - } - - p { - color: #fff; - font-size: 14px; - font-weight: 400; - letter-spacing: 1px; - line-height: 22px; - margin: 0 0 20px; - } - - .tribe-marketing-notice__info { - - /* hide on mobile */ - @media screen and (max-width: 767px) { - display: none; - } - } - - .tribe-marketing-notice__cta-shop-now { - - a { - background-color: #3849f5; - border: 1px solid #3849f5; - border-radius: 125px; - color: #fff; - font-family: Inconsolata, monospace; /* todo: enqueue font */ - font-size: 14px; - font-weight: 400; - line-height: 1; - padding: 12px 27px; - - &:active, - &:focus, - &:focus-within, - &:hover { - background-color: #1c39bb; - border: 1px solid #1c39bb; - box-shadow: none; - outline: none; - } - } - } - - .tribe-marketing-notice__cta-stellar-deals { - - a { - color: #fff; - font-size: 14px; - font-weight: 700; - line-height: 24px; - text-transform: none; - - &:active, - &:focus, - &:focus-within, - &:hover { - box-shadow: none; - color: #1c39bb; - outline: none; - } - } - } - - .tribe-marketing-notice__cta-shop-now--desktop { - - /* hide on mobile */ - @media screen and (max-width: 767px) { - display: none; - } - } - - .tribe-marketing-notice__cta-shop-now--mobile { - display: none; - - @media screen and (max-width: 767px) { - display: block; - margin-right: 10px; - } - } - - .tribe-marketing-notice__col--inner { - align-items: center; - display: flex; - flex-wrap: wrap; - } - - .tribe-marketing-notice__col--md { - flex: 35%; - - @media (min-width: 768px) and (max-width: 1023px) { - flex: 45%; - } - } - - .tribe-marketing-notice__col--lg { - flex: 40%; - - @media (min-width: 768px) and (max-width: 1023px) { - flex: 45%; - } - } - - .tribe-marketing-notice__col--sm { - flex: 20%; - z-index: 1; - - @media (min-width: 768px) and (max-width: 1023px) { - flex: 10%; - } - - .tribe-marketing-notice__col--sm-bg { - bottom: 0; - height: 8vw; - position: absolute; - right: 0; - width: auto; - z-index: -1; - - @media (min-width: 768px) and (max-width: 1023px) { - height: 11vw; - } - - @media screen and (max-width: 767px) { - height: 35vw; - right: -45vw; - } - } - } - } - } } .tribe-ea-dropdown, diff --git a/tests/wpunit/Common/Admin/Conditional_Content/Promotional_Content_Test.php b/tests/wpunit/Common/Admin/Conditional_Content/Promotional_Content_Test.php index e80478a437..b928037397 100644 --- a/tests/wpunit/Common/Admin/Conditional_Content/Promotional_Content_Test.php +++ b/tests/wpunit/Common/Admin/Conditional_Content/Promotional_Content_Test.php @@ -13,7 +13,6 @@ use Codeception\TestCase\WPTestCase; use TEC\Common\Admin\Conditional_Content\Black_Friday; -use TEC\Common\Admin\Conditional_Content\Stellar_Sale; use Tribe\Tests\Traits\With_Uopz; use Tribe__Plugins_API; @@ -33,11 +32,6 @@ class Promotional_Content_Test extends WPTestCase { */ protected $black_friday; - /** - * @var Stellar_Sale - */ - protected $stellar_sale; - /** * Set up test environment. * @@ -45,10 +39,6 @@ class Promotional_Content_Test extends WPTestCase { */ public function set_up(): void { $this->black_friday = tribe( Black_Friday::class ); - $this->stellar_sale = tribe( Stellar_Sale::class ); - - // Clear any dismissed notices - delete all instances. - $user_id = get_current_user_id(); } /** @@ -65,7 +55,6 @@ public function tear_down(): void { remove_all_filters( 'tec_should_hide_upsell' ); remove_all_filters( 'tec_admin_conditional_content_black-friday_should_display' ); - remove_all_filters( 'tec_admin_conditional_content_stellar-sale_should_display' ); } /** diff --git a/tests/wpunit/Common/Admin/Conditional_Content/Traits/Trait_Integration_Test.php b/tests/wpunit/Common/Admin/Conditional_Content/Traits/Trait_Integration_Test.php index 473c52a447..8ec59f345e 100644 --- a/tests/wpunit/Common/Admin/Conditional_Content/Traits/Trait_Integration_Test.php +++ b/tests/wpunit/Common/Admin/Conditional_Content/Traits/Trait_Integration_Test.php @@ -87,7 +87,7 @@ public function get_slug(): string { return $this->slug . '-' . date_i18n( 'Y' ); } - // Time adjustments (like in Black_Friday/Stellar_Sale). + // Time adjustments (like in Black_Friday). protected function get_start_time(): ?Date_I18n { $date = $this->get_start_time_from_trait(); if ( null === $date ) { @@ -104,7 +104,7 @@ protected function get_end_time(): ?Date_I18n { return $date->setTime( 4, 0 ); } - // Compose all trait checks like Black_Friday/Stellar_Sale. + // Compose all trait checks like Black_Friday. public function should_display(): bool { // Check user capability. if ( ! $this->check_capability() ) { diff --git a/tests/wpunit/Common/Admin/Custom_List_Table_Test.php b/tests/wpunit/Common/Admin/Custom_List_Table_Test.php index 2f436a656e..9f735b89c4 100644 --- a/tests/wpunit/Common/Admin/Custom_List_Table_Test.php +++ b/tests/wpunit/Common/Admin/Custom_List_Table_Test.php @@ -3,9 +3,12 @@ namespace TEC\Common\Admin; use Codeception\TestCase\WPTestCase; +use Tribe\Tests\Traits\With_Uopz; use RuntimeException; class Custom_List_Table_Test extends WPTestCase { + use With_Uopz; + private static $back_up; /** @@ -17,6 +20,8 @@ public function prepare() { self::$back_up = $wp_actions; $wp_actions = []; + + $this->set_fn_return( 'tribe_exit', true ); } /**