Skip to content

Commit 5ca4858

Browse files
release: fix
- Hotfix for Black Friday Global notice
2 parents b99a936 + 0ac4f2c commit 5ca4858

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

assets/css/banner.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,8 @@
4747
.tsdk-banner-urgency-text {
4848
left: 0%;
4949
}
50+
}
51+
52+
.notice:not(#tsdk_banner) {
53+
display: none;
5054
}

src/Modules/Announcements.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ public function black_friday_notice_render() {
325325
foreach ( Loader::get_products() as $product ) {
326326
$slug = $product->get_slug();
327327

328-
// Do not add if the contains the string 'pro'.
329-
if ( strpos( $slug, 'pro' ) !== false ) {
330-
continue;
328+
// NOTE: No notice if the user has at least one Pro product.
329+
if ( $product->requires_license() ) {
330+
return;
331331
}
332332

333333
$product_names[] = $product->get_name();

0 commit comments

Comments
 (0)