diff --git a/assets/css/_black-friday.scss b/assets/css/_black-friday.scss new file mode 100644 index 0000000..29c9b54 --- /dev/null +++ b/assets/css/_black-friday.scss @@ -0,0 +1,57 @@ +.notice.notice-black-friday { + position: relative; + .notice-content { + width: 85%; + h3{ + font-size: 1.5rem; + } + } + .notice-footer { + justify-content: space-between; + .footer-btn { + display: flex; + gap: 20px; + } + .black-friday-dismiss-btn{ + position: absolute; + top: 12px; + right: 12px; + background-color: transparent; + border-color: transparent; + color: #64748B; + &:hover { + color: #000; + } + } + .black-friday-footer-text { + float: right; + color: #8c8f94; + } + } + @media screen and (max-width: 500px ) { + .notice-body { + align-items: flex-start; + h3{ + font-size: 18px; + } + } + .notice-footer { + flex-direction: column; + .footer-btn { + flex-direction: column; + align-items: center; + gap: 10px; + } + .black-friday-dismiss-btn { + top: -6px; + right: 3px; + z-index: 1; + padding: 0; + color: red; + } + .btn-text{ + display: none; + } + } + } +} diff --git a/assets/css/admin.scss b/assets/css/admin.scss index 086f38b..54cebe0 100644 --- a/assets/css/admin.scss +++ b/assets/css/admin.scss @@ -1,4 +1,4 @@ -@import "halloween.scss"; +@import "black-friday.scss"; .bk-card { &.promo-panel{ background: #2563eb; diff --git a/assets/images/black-friday-icon.svg b/assets/images/black-friday-icon.svg new file mode 100644 index 0000000..bf7f905 --- /dev/null +++ b/assets/images/black-friday-icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/includes/Admin/Notices.php b/includes/Admin/Notices.php index 0f33b6f..6dc6761 100644 --- a/includes/Admin/Notices.php +++ b/includes/Admin/Notices.php @@ -30,16 +30,16 @@ public function admin_notices() { $installed_time = get_option( 'wc_min_max_quantities_installed' ); $current_time = wp_date( 'U' ); - // Halloween's promotion notice. - $halloween_time = date_i18n( strtotime( '2024-11-11 00:00:00' ) ); - if ( $current_time < $halloween_time ) { + // Promotional notice for Black Friday. + $offer_time = date_i18n( strtotime( '2024-12-07 00:00:00' ) ); + if ( $current_time < $offer_time ) { wc_min_max_quantities()->notices->add( array( - 'message' => __DIR__ . '/views/notices/halloween.php', + 'message' => __DIR__ . '/views/notices/black-friday.php', + 'notice_id' => 'wcmmq_black_friday_promotion_24', + 'class' => 'notice-black-friday', + 'style' => 'border-left-color:#2271b1;', 'dismissible' => false, - 'notice_id' => 'wcmmq_halloween_promotion', - 'style' => 'border-left-color: #8500ff;background-image: url("' . esc_url( wc_min_max_quantities()->get_assets_url( 'images/halloween-banner.svg' ) ) . '");', - 'class' => 'notice-halloween', ) ); } @@ -49,7 +49,7 @@ public function admin_notices() { array( 'message' => __DIR__ . '/views/notices/upgrade.php', 'notice_id' => 'wcmmq_upgrade', - 'style' => 'border-left-color: #0542fa;', + 'style' => 'border-left-color:#0542fa;', 'dismissible' => false, ) ); diff --git a/includes/Admin/views/notices/black-friday.php b/includes/Admin/views/notices/black-friday.php new file mode 100644 index 0000000..2190ae0 --- /dev/null +++ b/includes/Admin/views/notices/black-friday.php @@ -0,0 +1,51 @@ + +
+
+ WooCommerce Min-Max Quantities Black Friday Offer +
+
+

+ +

+

+ ' . esc_attr( '40% OFF' ) . '', + '' . esc_attr( 'FLASH40' ) . '' + ) + ); + ?> +

+
+
+ diff --git a/languages/wc-min-max-quantities.pot b/languages/wc-min-max-quantities.pot index 306109e..9184708 100644 --- a/languages/wc-min-max-quantities.pot +++ b/languages/wc-min-max-quantities.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: WC Min Max Quantities 2.0.2\n" "Report-Msgid-Bugs-To: https://pluginever.com/support/\n" -"POT-Creation-Date: 2024-11-24 06:40:43+00:00\n" +"POT-Creation-Date: 2024-11-24 10:21:59+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -223,6 +223,35 @@ msgstr "" msgid "Documentation" msgstr "" +#: includes/Admin/views/notices/black-friday.php:19 +msgid "Black Friday & Cyber Monday: Flat 40% OFF All Premium Plugins!" +msgstr "" + +#: includes/Admin/views/notices/black-friday.php:26 +#. translators: 1.Offer Percentage, 2. Coupon Code. +msgid "" +"Boost your WooCommerce store this Black Friday! Get %1$s on all premium " +"plugins with code %2$s. Don’t miss this limited-time deal!" +msgstr "" + +#: includes/Admin/views/notices/black-friday.php:39 +msgid "Claim your 40% discount!!" +msgstr "" + +#: includes/Admin/views/notices/black-friday.php:43 +#: includes/Admin/views/notices/halloween.php:43 +msgid "Remind me later" +msgstr "" + +#: includes/Admin/views/notices/black-friday.php:47 +#: includes/Admin/views/notices/halloween.php:51 +msgid "DISMISS" +msgstr "" + +#: includes/Admin/views/notices/black-friday.php:50 +msgid "Valid until November 7, 2024" +msgstr "" + #: includes/Admin/views/notices/halloween.php:19 msgid "Limited Time Offer! PluginEver Halloween Sale: 30% OFF!!" msgstr "" @@ -238,18 +267,10 @@ msgstr "" msgid "Claim your discount!!" msgstr "" -#: includes/Admin/views/notices/halloween.php:43 -msgid "Remind me later" -msgstr "" - #: includes/Admin/views/notices/halloween.php:47 msgid "Never show this again!" msgstr "" -#: includes/Admin/views/notices/halloween.php:51 -msgid "DISMISS" -msgstr "" - #: includes/Admin/views/notices/halloween.php:54 msgid "Valid until November 10, 2024" msgstr ""