PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.3
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.3
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
← All changes | admin/class-wpfnl-banner.php +210 -81 3.12.2 → 3.13.3 View file →
@@ -53,9 +53,9 @@
53 53 $this->btn_link = $btn_link;
54 54 $this->start_date = strtotime($start_date);
55 55 $this->end_date = strtotime($end_date);
56 56
57 - if ('yes' === get_option('_is_show_eid_ul_fitr_26_banner', 'yes')) {
57 + if ('yes' === get_option('_is_show_us_banner', 'yes')) {
58 58 // Hook into the admin_notices action to display the banner
59 59 add_action('admin_notices', [$this, 'display_banner']);
60 60 add_action('admin_head', array($this, 'add_styles'));
61 61 }
@@ -67,9 +67,9 @@
67 67 * @return array Time remaining in days, hours, and minutes
68 68 */
69 69 public function wpf_get_promotion_banner_countdown()
70 70 {
71 - $end_date = strtotime('2026-01-07 23:59:59');
71 + $end_date = strtotime('2026-07-07 23:59:59');
72 72 $now = current_time('timestamp');
73 73 $diff = $end_date - $now;
74 74
75 75 return array(
@@ -85,9 +85,9 @@
85 85 */
86 86 public function display_banner()
87 87 {
88 88 $screen = get_current_screen();
89 - $promotional_notice_pages = ['dashboard', 'plugins', 'wpfunnels_page_wp_funnels', 'wpfunnels_page_edit_funnel', 'wp-funnels_page_wpfnl_settings'];
89 + $promotional_notice_pages = ['dashboard', 'plugins', 'wpfunnels_page_store_checkout','wpfunnels_page_wp_funnels', 'wpfunnels_page_wpfunnels_integrations', 'wpfunnels_page_wpfnl_automations', 'wpfunnels_page_edit_funnel', 'wpfunnels_page_wpfnl_settings'];
90 90 $current_date_time = current_time('timestamp');
91 91
92 92 if (!in_array($screen->id, $promotional_notice_pages)) {
93 93 return;
@@ -104,21 +104,46 @@
104 104 ?>
105 105 <div class="gwpf-promotional-notice <?php echo esc_attr($this->occasion); ?>-banner notice">
106 106 <div class="gwpf-tb__notification">
107 107 <div class="banner-overflow">
108 - <section class="gwpf-promotional-banner" aria-labelledby="wpf-halloween-offer">
108 + <section class="gwpf-promotional-banner" aria-labelledby="US independence day offer">
109 109 <div class="gwpf-container">
110 110 <div class="promotional-banner">
111 111 <div class="banner-content">
112 - <div class="banner-text">
113 - 🔥 Eid ul-Fitr Special: Claim A Huge <span class="highlighted-text">40% OFF</span> On WPFunnels! - Limited Time Deal!
112 + <div class="banner-logo-area">
113 + <span class="us-flag">
114 + <img src="<?php echo WPFNL_DIR_URL . 'admin/assets/images/us-flag.webp'; ?>" alt="us-flag" width="117" height="70">
115 + </span>
116 + <span class="discount-text">
117 + <small><?php echo __('Happy 4th Of July!', 'wpfunnels'); ?></small>
118 + <?php echo __('Get 30% Off', 'wpfunnels'); ?>
119 + </span>
120 + </div>
121 +
122 + <div class="countdown-timer" id="wpf-promo-countdown">
123 + <div class="countdown-item">
124 + <span id="wpf-promo-days"><?php echo esc_html(str_pad($countdown['days'], 2, '0', STR_PAD_LEFT)); ?></span>
125 + <small><?php echo __('DAY', 'wpfunnels'); ?></small>
126 + </div>
127 + <div class="countdown-item">
128 + <span id="wpf-promo-hours"><?php echo esc_html(str_pad($countdown['hours'], 2, '0', STR_PAD_LEFT)); ?></span>
129 + <small><?php echo __('HR', 'wpfunnels'); ?></small>
130 + </div>
131 + <div class="countdown-item">
132 + <span id="wpf-promo-mins"><?php echo esc_html(str_pad($countdown['mins'], 2, '0', STR_PAD_LEFT)); ?></span>
133 + <small><?php echo __('MIN', 'wpfunnels'); ?></small>
134 + </div>
135 + <div class="countdown-item">
136 + <span id="wpf-promo-secs"><?php echo esc_html(str_pad($countdown['secs'], 2, '0', STR_PAD_LEFT)); ?></span>
137 + <small><?php echo __('SEC', 'wpfunnels'); ?></small>
138 + </div>
114 139 </div>
115 140
116 - <a href="<?php echo esc_url($this->btn_link); ?>" class="cta-button" role="button" aria-label="get special discount " target="_blank">
141 + <a href="<?php echo esc_url($this->btn_link); ?>" class="cta-button" role="button" aria-label="claim your deal" target="_blank">
117 142 <?php
118 - echo __('View Offer', 'getwpfunnels');
143 + echo __('Claim Your Deal', 'wpfunnels');
119 144 ?>
120 - <svg width="11" height="11" fill="none" viewBox="0 0 11 11" xmlns="http://www.w3.org/2000/svg"><path fill="#3C1F7D" stroke="#3C1F7D" stroke-width=".2" d="M9.419.1a.88.88 0 01.88.881V9.42a.88.88 0 11-1.761 0V3.11l-6.934 6.933A.88.88 0 01.358 8.796l6.934-6.934H.982A.88.88 0 11.981.1h8.437z"/></svg>
145 + <svg xmlns="http://www.w3.org/2000/svg" width="8" height="9" viewBox="0 0 8 9" fill="none"><path d="M8 0.703124V8.29686C8 8.48334 7.93415 8.66218 7.81694 8.79405C7.69973 8.92591 7.54076 8.99999 7.375 8.99999C7.20924 8.99999 7.05027 8.92591 6.93306 8.79405C6.81585 8.66218 6.75 8.48334 6.75 8.29686V2.40061L1.06695 8.79406C0.949738 8.92592 0.790765 9 0.625004 9C0.459243 9 0.30027 8.92592 0.183059 8.79406C0.0658485 8.6622 0 8.48335 0 8.29687C0 8.11039 0.0658485 7.93155 0.183059 7.79968L5.86613 1.40625H0.625012C0.459252 1.40625 0.300281 1.33217 0.183071 1.20031C0.0658608 1.06845 1.28672e-05 0.889604 1.28672e-05 0.703124C1.28672e-05 0.516644 0.0658608 0.337802 0.183071 0.20594C0.300281 0.0740789 0.459252 0 0.625012 0L7.375 0C7.54076 0 7.69973 0.0740789 7.81694 0.20594C7.93415 0.337802 8 0.516644 8 0.703124Z" fill="#fff"/></svg>
121 146 </a>
122 147 </div>
123 148 </div>
124 149 </div>
@@ -125,9 +150,9 @@
125 150 </section>
126 151 </div>
127 152
128 153 <button class="close-promotional-banner" type="button" aria-label="close banner">
129 - <svg width="12" height="13" fill="none" viewBox="0 0 12 13" xmlns="http://www.w3.org/2000/svg"><path stroke="#7A8B9A" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 1.97L1 11.96m0-9.99l10 9.99"/></svg>
154 + <svg width="12" height="13" fill="none" viewBox="0 0 12 13" xmlns="http://www.w3.org/2000/svg"><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 1.97L1 11.96m0-9.99l10 9.99"/></svg>
130 155 </button>
131 156 </div>
132 157 </div>
133 158 <!-- .gwpf-tb-notification end -->
@@ -132,43 +157,62 @@
132 157 </div>
133 158 <!-- .gwpf-tb-notification end -->
134 159
135 160 <script>
136 - function updateCountdown() {
137 - var endDate = new Date("2026-01-07 23:59:59").getTime();
138 - var now = new Date().getTime();
139 - var timeLeft = endDate - now;
161 + (function() {
162 + var countdownInterval;
140 163
141 - var days = Math.floor(timeLeft / (1000 * 60 * 60 * 24));
142 - var hours = Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
143 - var minutes = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));
144 - var seconds = Math.floor((timeLeft % (1000 * 60)) / 1000);
164 + function pad(num) {
165 + return String(num).padStart(2, '0');
166 + }
145 167
146 - var daysElement = document.getElementById('wpf-halloween-days');
147 - var hoursElement = document.getElementById('wpf-halloween-hours');
148 - var minsElement = document.getElementById('wpf-halloween-mins');
149 - var secsElement = document.getElementById('wpf-halloween-secs');
168 + function updateCountdown() {
169 + var endDate = new Date("2026-07-07 23:59:59").getTime();
170 + var now = new Date().getTime();
171 + var timeLeft = endDate - now;
150 172
151 - if (daysElement) {
152 - daysElement.innerHTML = days;
153 - }
173 + if (timeLeft <= 0) {
174 + clearInterval(countdownInterval);
154 175
155 - if (hoursElement) {
156 - hoursElement.innerHTML = hours;
157 - }
176 + var banner = document.querySelector('.gwpf-promotional-notice');
177 + if (banner) {
178 + banner.style.display = 'none';
179 + }
158 180
159 - if (minsElement) {
160 - minsElement.innerHTML = minutes;
181 + return;
182 + }
183 +
184 + var days = Math.floor(timeLeft / (1000 * 60 * 60 * 24));
185 + var hours = Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
186 + var minutes = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));
187 + var seconds = Math.floor((timeLeft % (1000 * 60)) / 1000);
188 +
189 + var daysElement = document.getElementById('wpf-promo-days');
190 + var hoursElement = document.getElementById('wpf-promo-hours');
191 + var minsElement = document.getElementById('wpf-promo-mins');
192 + var secsElement = document.getElementById('wpf-promo-secs');
193 +
194 + if (daysElement) {
195 + daysElement.innerHTML = pad(days);
196 + }
197 +
198 + if (hoursElement) {
199 + hoursElement.innerHTML = pad(hours);
200 + }
201 +
202 + if (minsElement) {
203 + minsElement.innerHTML = pad(minutes);
204 + }
205 + if (secsElement) {
206 + secsElement.innerHTML = pad(seconds);
207 + }
161 208 }
162 - if (secsElement) {
163 - secsElement.innerHTML = seconds;
164 - }
165 - }
166 209
167 - document.addEventListener('DOMContentLoaded', function() {
168 - updateCountdown();
169 - setInterval(updateCountdown, 1000); // Update every minute
170 - });
210 + document.addEventListener('DOMContentLoaded', function() {
211 + updateCountdown();
212 + countdownInterval = setInterval(updateCountdown, 1000);
213 + });
214 + })();
171 215 </script>
172 216 <?php
173 217 }
174 218
@@ -202,8 +246,10 @@
202 246 box-shadow: none;
203 247 display: block;
204 248 max-height: 110px;
205 249 }
250 +
251 + .wpfunnels_page_wpfnl_settings .gwpf-tb__notification,
206 252 .wpfunnels_page_wp_funnels .gwpf-tb__notification {
207 253 width: calc(100% - 40px);
208 254 margin: 20px 0 20px 20px;
209 255 }
@@ -216,21 +262,22 @@
216 262
217 263 /* ---banner style start--- */
218 264 .gwpf-promotional-banner {
219 265 position: relative;
220 - background-color: #2d1568;
221 - background: linear-gradient(90deg, #AC77FD -6.28%, #3C1F7D 21.34%, #3C1F7D 87.74%, #AC77FD 130.48%);
222 266 z-index: 1111;
223 - padding: 6px 0;
267 + padding: 0;
268 + /* padding: 6px 0; */
269 + background: #7D4CEF;
270 + box-shadow: 0 1px 1px 0 rgba(32, 28, 254, 0.10);
224 271 }
225 272 .gwpf-promotional-banner .promotional-banner {
226 - color: white;
227 - padding: 3px 20px 0;
228 273 /* padding: 12px 20px; */
229 - text-align: center;
230 - font-size: 14px;
231 - line-height: 1.4;
232 - position: relative;
274 + padding-top: 1px;
275 + text-align: center;
276 + font-size: 14px;
277 + line-height: 1.4;
278 + position: relative;
279 + height: 70px;
233 280 }
234 281 .gwpf-promotional-banner .banner-content {
235 282 max-width: 1200px;
236 283 margin: 0 auto;
@@ -237,12 +284,46 @@
237 284 display: inline-flex;
238 285 align-items: center;
239 286 justify-content: center;
240 287 flex-wrap: wrap;
241 - gap: 20px;
288 + gap: 70px;
242 289 row-gap: 8px;
243 290 position: relative;
244 291 }
292 + .gwpf-promotional-banner .banner-logo-area {
293 + display: flex;
294 + align-items: center;
295 + gap: 17px;
296 + }
297 +
298 + .gwpf-promotional-banner .banner-logo-area img {
299 + display: block;
300 + position: relative;
301 + top: -1px;
302 + }
303 +
304 + .gwpf-promotional-banner .discount-text {
305 + color: #FFF;
306 + font-family: 'Inter', sans-serif;
307 + font-size: 24px;
308 + font-weight: 700;
309 + line-height: 1.2;
310 + letter-spacing: -0.084px;
311 + display: flex;
312 + flex-flow: column;
313 + align-items: flex-start;
314 + gap: 7px;
315 +
316 + }
317 +
318 + .gwpf-promotional-banner .discount-text small {
319 + color: #FFF;
320 + font-family: 'Inter', sans-serif;
321 + font-size: 16px;
322 + font-weight: 500;
323 + line-height: 1;
324 + letter-spacing: -0.32px;
325 + }
245 326 .gwpf-promotional-banner .banner-text {
246 327 display: flex;
247 328 align-items: center;
248 329 flex-wrap: wrap;
@@ -248,10 +329,10 @@
248 329 flex-wrap: wrap;
249 330 gap: 6px;
250 331 row-gap: 0;
251 332 justify-content: center;
252 - font-size: 16px;
253 - color: #fff;
333 + font-size: 15px;
334 + color: #100627;
254 335 font-weight: 400;
255 336 line-height: 1.4;
256 337 text-transform: capitalize;
257 338 letter-spacing: 0;
@@ -262,40 +343,75 @@
262 343 .gwpf-promotional-banner .banner-text .highlighted-text {
263 344 color: #ee8134;
264 345 font-weight: 700;
265 346 }
266 - .gwpf-promotional-banner .halloween-bird-left {
267 - position: absolute;
268 - left: -47px;
269 - bottom: -7px;
347 +
348 + .gwpf-promotional-banner .countdown-timer {
349 + display: flex;
350 + align-items: center;
351 + gap: 2px;
270 352 }
271 - .gwpf-promotional-banner .halloween-bird-right {
272 - position: absolute;
273 - right: -50px;
274 - top: -5px;
353 + .gwpf-promotional-banner .countdown-item {
354 + display: flex;
355 + flex-direction: column;
356 + align-items: center;
357 + justify-content: center;
358 + gap: 4px;
359 + min-width: 50px;
360 + height: 50px;
361 + padding: 4px 6px;
362 + color: #fff;
363 + line-height: 1.2;
364 + border: 1px solid #8555f5;
365 + background: rgba(54, 30, 107, 0.40);
366 +
275 367 }
368 +
369 + .gwpf-promotional-banner .countdown-item:first-child {
370 + border-radius: 4px 0 0 4px;
371 + }
372 +
373 + .gwpf-promotional-banner .countdown-item:last-child {
374 + border-radius: 0 4px 4px 0;
375 + }
376 +
377 + .gwpf-promotional-banner .countdown-item span {
378 + font-size: 20px;
379 + font-weight: 600;
380 + line-height: 1;
381 + font-family: 'Inter', sans-serif;
382 + }
383 + .gwpf-promotional-banner .countdown-item small {
384 + text-transform: uppercase;
385 + color: rgba(255, 255, 255, 0.80);
386 + text-align: center;
387 + font-family: Inter;
388 + font-size: 12px;
389 + font-weight: 400;
390 + line-height: 1;
391 + letter-spacing: 0.24px;
392 + }
276 393 .gwpf-promotional-banner .cta-button {
277 - color: #3C1F7D;
278 - font-size: 16px;
279 - font-style: normal;
280 - font-weight: 700;
281 - line-height: normal;
282 - text-decoration: none;
283 - text-decoration-thickness: 2px;
284 - text-underline-offset: 5px;
285 - display: inline-flex;
286 - align-items: center;
287 - gap: 5px;
288 - transition: all 0.2s ease;
289 - background: #fff;
290 - padding: 9px 14px;
291 - border-radius: 50px;
394 + color: #fff;
395 + font-size: 15px;
396 + font-style: normal;
397 + font-weight: 600;
398 + line-height: 1;
399 + text-decoration: none;
400 + display: inline-flex;
401 + align-items: center;
402 + gap: 5px;
403 + transition: all 0.2s ease;
404 + background: #F7941D;
405 + border-radius: 6px;
406 + padding: 12px 15px;
407 + font-family: 'Inter', sans-serif;
292 408 }
293 409 .gwpf-promotional-banner .cta-button svg {
294 410 transition: transform 0.3s ease;
295 411 }
296 412
297 - .gwpf-promotional-banner .cta-button:focus,
413 + /* .gwpf-promotional-banner .cta-button:focus,
298 414 .gwpf-promotional-banner .cta-button:visited {
299 415 color: #3C1F7D !important;
300 416 }
301 417 .gwpf-promotional-banner .cta-button:hover {
@@ -303,10 +419,14 @@
303 419 }
304 420 .gwpf-promotional-banner .cta-button:hover svg path {
305 421 stroke: #3C1F7D;
306 422 fill: #3C1F7D;
423 + } */
424 +
425 + .gwpf-promotional-banner .cta-button:hover {
426 + text-decoration: none;
427 + color: #fff;
307 428 }
308 -
309 429 .gwpf-promotional-banner .cta-button:hover svg {
310 430 transform: translateX(3px);
311 431 }
312 432
@@ -312,14 +432,15 @@
312 432
313 433
314 434 .gwpf-tb__notification .close-promotional-banner {
315 435 position: absolute;
316 - top: -10px;
317 - right: -9px;
318 - background: #fff;
436 + top: 50%;
437 + right: 10px;
438 + transform: translateY(-50%);
439 + background: transparent;
319 440 border: none;
320 441 padding: 0;
321 - border-radius: 50%;
442 + border-radius:0;
322 443 cursor: pointer;
323 444 z-index: 9;
324 445 width: 30px;
325 446 height: 30px;
@@ -328,12 +449,20 @@
328 449 justify-content: center;
329 450 }
330 451
331 452 .gwpf-tb__notification .close-promotional-banner svg {
332 - width: 22px;
453 + width: 11px;
454 + height: 11px;
333 455 display: block;
334 456 }
335 457
458 + @media only screen and (max-width: 1199px) {
459 + .gwpf-promotional-banner .banner-content {
460 + gap: 40px;
461 + row-gap: 8px;
462 + }
463 + }
464 +
336 465 @media only screen and (max-width: 991px) {
337 466 .promotional-banner {
338 467 padding: 16px 20px;
339 468 }
@@ -378,6 +507,6 @@
378 507 }
379 508 </style>
380 509 <?php
381 510 }
382 -
511 +
383 512 }