PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.0
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.0
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
wpfunnels / admin / modules / settings / js / settings.js

settings.js in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.13.0, at admin/modules/settings/js/settings.js

589 lines 24.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 jQuery(function ($) {
2
3 'use strict';
4 $(document).ready(function ($) {
5 /**
6 * toggle password functionality on settings page
7 */
8 $(".toggle-eye-icon").click(function() {
9 $('.toggle-eye-icon').removeClass('hide-eye-icon');
10 $(this).addClass('hide-eye-icon');
11 let input = $('#wpfnl-google-map-api-key');
12 if ( "password" === input.attr("type") ) {
13 input.attr("type", "text");
14 } else {
15 input.attr("type", "password");
16 }
17 });
18
19 function toggleLogOptions() {
20 const $checkbox = $('#enable-log-status');
21 const $logOptionsWrapper = $('.log-options-wrapper');
22
23 if (!$checkbox.length || !$logOptionsWrapper.length) return;
24
25 $checkbox.on('change', function () {
26 if ($(this).is(':checked')) {
27 $logOptionsWrapper.show();
28 } else {
29 $logOptionsWrapper.hide();
30 }
31 });
32 }
33 toggleLogOptions();
34
35 function enable_disable_recapcha() {
36 if ($("input[name='wpfnl-recapcha-enable']").prop("checked")) {
37 $("#wpfnl-recapcha").show()
38 } else {
39 $("#wpfnl-recapcha").hide()
40 }
41 }
42
43 // Toggle revenue report settings
44 function toggleRevenueReportSettings() {
45 if ($("#wpfnl-enable-revenue-report").is(':checked')) {
46 $("#wpfnl-revenue-report-settings").show();
47 } else {
48 $("#wpfnl-revenue-report-settings").hide();
49 }
50 }
51 toggleRevenueReportSettings();
52
53 $("#wpfnl-enable-revenue-report").on('change', function() {
54 toggleRevenueReportSettings();
55 });
56
57 $('#wpfunnels-page-builder').on('click', '.wpfnl-single-item', function() {
58 $('#wpfunnels-page-builder .wpfnl-single-item').removeClass('checked');
59 $(this).addClass('checked');
60 $('#clear-template').trigger('click');
61 });
62
63 $('#wpfunnels-funnel-type').on('click', '.wpfnl-single-item', function() {
64 $('#wpfunnels-funnel-type .wpfnl-single-item').removeClass('checked');
65 $(this).addClass('checked');
66 $('#clear-template').trigger('click');
67 });
68
69 $('#wpfunnels-canvas-mode').on('click', '.wpfnl-single-item', function() {
70 $('#wpfunnels-canvas-mode .wpfnl-single-item').removeClass('checked');
71 $(this).addClass('checked');
72 });
73
74 if ($("input[name='wpfnl-utm-enable']").prop("checked")) {
75 $("#wpfnl-utm").show()
76 } else {
77 $("#wpfnl-utm").hide()
78 }
79 $('#utm-enable').on('click', function () {
80 if ($("input[name='wpfnl-utm-enable']").prop("checked")) {
81 $("#wpfnl-utm").show()
82 } else {
83 $("#wpfnl-utm").hide()
84 }
85 })
86
87 if ($("input[name='wpfnl-gtm-enable']").prop("checked")) {
88 $("#wpfnl-gtm").show()
89 } else {
90 $("#wpfnl-gtm").hide()
91 }
92 $('#gtm-enable').on('click', function () {
93 if ($("input[name='wpfnl-gtm-enable']").prop("checked")) {
94 $("#wpfnl-gtm").show()
95 } else {
96 $("#wpfnl-gtm").hide()
97 }
98 })
99
100
101 if ($("input[name='enable-skip-cart']").prop("checked")) {
102 $(".wpfnl-skip-cart").show()
103 } else {
104 $(".wpfnl-skip-cart").hide()
105 }
106 $('#enable-skip-cart').on('click', function () {
107 if ($("input[name='enable-skip-cart']").prop("checked")) {
108 $(".wpfnl-skip-cart").show()
109 } else {
110 $(".wpfnl-skip-cart").hide()
111 }
112 })
113
114
115 if ($("input[name='wpfnl-facebook-pixel-enable']").prop("checked")) {
116 $("#wpfnl-facebook-pixel").show()
117 } else {
118 $("#wpfnl-facebook-pixel").hide()
119 }
120 $('#facebook-pixel-enable').on('click', function () {
121 if ($("input[name='wpfnl-facebook-pixel-enable']").prop("checked")) {
122 $("#wpfnl-facebook-pixel").show()
123 } else {
124 $("#wpfnl-facebook-pixel").hide()
125 }
126 })
127
128 enable_disable_recapcha()
129
130 $('#recapcha-pixel-enable').on('click', function () {
131 enable_disable_recapcha()
132 })
133
134 $('.wpfnl-log-view').on('click', function (e) {
135 e.preventDefault();
136 var thisElement = $(this);
137 show_log(thisElement);
138 })
139
140 $('.wpfnl-log-delete').on('click', function (e) {
141 e.preventDefault();
142 var thisElement = $(this);
143 delete_log(thisElement);
144 })
145
146 /**
147 * Show WPFunnels log
148 */
149 function show_log(thisElement) {
150 thisElement.find('.wpfnl-loader').css('display', 'inline-block');
151
152 var log_key = $('#wpfnl-log option:selected').val();
153 var payload = {
154 'logKey': log_key
155 };
156 if (!log_key) {
157 $('#log-viewer pre').html('');
158 } else {
159 wpAjaxHelperRequest('wpfnl-show-log', payload)
160 .success(function (response) {
161 thisElement.find('.wpfnl-loader').hide();
162
163 if (response.success) {
164 $('#log-viewer pre').html(response.content);
165 }
166 })
167 .error(function (response) {
168 });
169 }
170
171 }
172
173 /**
174 * Show WPFunnels log
175 */
176 function delete_log(thisElement) {
177 thisElement.find('.wpfnl-loader').css('display', 'inline-block');
178 localStorage.setItem("buttonClicked", true);
179
180 var log_key = $('#wpfnl-log option:selected').val();
181 var payload = {
182 'logKey': log_key
183 };
184 if (!log_key) {
185 $('#log-viewer').html('');
186 } else {
187 wpAjaxHelperRequest('wpfnl-delete-log', payload)
188 .success(function (response) {
189 if (response.success) {
190 $('#wpfnl-log option:selected').remove();
191 $('#log-viewer').empty();
192 }
193
194 thisElement.find('.wpfnl-loader').hide();
195
196 })
197 .error(function (response) {
198 });
199 }
200
201 }
202
203 var GeneralSettingsHandler = function () {
204 $(document.body)
205 .on('click', '#wpfnl-update-global-settings', this.updateGeneralSettings)
206 .on('click', '#clear-template', this.clearTemplates)
207 .on('click', '#clear-transients', this.clearTransients)
208
209 /**
210 * settings page Permalink Settings permalink
211 * change on keyup
212 *
213 * @since 1.0.0
214 */
215 $('code.stepbase').text($('input[name="wpfnl-permalink-step-base"]').val());
216 $('code.funnelbase').text($('input[name="wpfnl-permalink-funnel-base"]').val());
217
218 $('input[name="wpfnl-permalink-step-base"]').keyup(function () {
219 if ($(this).val() != '') {
220 $('code.stepbase').text($(this).val());
221 } else {
222 $('code.stepbase').text('wpfunnels');
223 }
224 });
225
226 $('input[name="wpfnl-permalink-funnel-base"]').keyup(function () {
227 if ($(this).val() != '') {
228 $('code.funnelbase').text($(this).val());
229 } else {
230 $('code.funnelbase').text('step');
231 }
232 });
233
234 };
235
236
237 /**
238 * update general settings
239 *
240 * @param e
241 * @since 1.0.0
242 */
243 GeneralSettingsHandler.prototype.updateGeneralSettings = function (e) {
244 e.preventDefault();
245 var userRole = {};
246 var permittedRole = {};
247 var gtmEvents = {};
248 var fbTrackEvent = {};
249 var advancedSettings = {};
250 $("input[name='analytics-role[]']").map(function () {
251 if ($(this).prop("checked")) {
252 userRole[$(this).data('role')] = 'true';
253 }
254 return $(this).prop("checked") ? 1 : 0;
255 }).get();
256
257 $("input[name='permission-role[]']").map(function () {
258 if ($(this).prop("checked")) {
259 permittedRole[$(this).data('role')] = 'true';
260 }
261 return $(this).prop("checked") ? 1 : 0;
262 }).get();
263
264
265 $("input[name='wpfnl-gtm-events[]']").map(function () {
266 if ($(this).prop("checked")) {
267 gtmEvents[$(this).data('role')] = 'true';
268 }
269 return $(this).prop("checked") ? 1 : 0;
270 }).get();
271
272 $("input[name='wpfnl-facebook_pixel_events[]']").map(function () {
273 if ($(this).prop("checked")) {
274 fbTrackEvent[$(this).data('role')] = 'true';
275 }
276 return $(this).prop("checked") ? 1 : 0;
277 }).get();
278
279
280 // get the role management values from settings
281 var checkboxes = $('input[name="user_role[]"]'),
282 userRoleManagement = window.WPFunnelVars.user_role_manager_data;
283
284 checkboxes.each(function(checkbox) {
285 var role = $(this).attr('data-role');
286 userRoleManagement[role] = $(this).is(":checked") ? 'yes' : 'no';
287 });
288
289 var payload = {
290 'funnel_type': $('#wpfunnels-funnel-type .wpfnl-single-item.checked').attr('data-value'),
291 'builder': $('#wpfunnels-page-builder .wpfnl-single-item.checked').attr('data-value'),
292 'funnel_builder_mode': $('#wpfunnels-canvas-mode .wpfnl-single-item.checked').attr('data-value') || 'vertical',
293 'uninstall_cleanup': $('#wpfnl-data-cleanup').is(':checked') ? 'on' : 'off',
294 'paypal_reference': $('#wpfunnels-paypal-reference').is(':checked') ? 'on' : 'off',
295 'analytics_roles': userRole,
296 'permission_role': permittedRole,
297 'order_bump': $('#wpfunnels-order-bump').is(':checked') ? 'on' : 'off',
298 'ab_testing': $('#wpfunnels-ab-testing').is(':checked') ? 'on' : 'off',
299 'permalink_settings': $("input[name='wpfunnels-set-permalink']:checked").val(),
300 'permalink_step_base': $('#wpfunnels-permalink-step-base').val(),
301 'permalink_funnel_base': $('#wpfunnels-permalink-funnel-base').val(),
302 'sender_email': $('#wpfunnels-optin-sender-email').val(),
303 'sender_name': $('#wpfunnels-optin-sender-name').val(),
304 'email_subject': $('#wpfunnels-optin-email-subject').val(),
305 'set_permalink': $('input[name="wpfunnels-set-permalink"]:checked').val(),
306 'offer_orders': $('input[name="offer-orders"]:checked').val(),
307 'skip_offer_step': $('#wpfnl-skip-offer-step').is(':checked') ? 'on' : 'off',
308 'skip_offer_step_for_free': $('#wpfnl-skip-offer-step-for-free').is(':checked') ? 'on' : 'off',
309 'skip_offer_for_recurring_buyer': $('#wpfnl-skip-offer-for-recurring-buyer').is(':checked') ? 'on' : 'off',
310 'skip_offer_for_recurring_buyer_within_year': $('#wpfnl-skip-offer-for-recurring-buyer-within-year').is(':checked') ? 'on' : 'off',
311 'show_supported_payment_gateway': $('#wpfnl-show-supported-payment-gateway').is(':checked') ? 'on' : 'off',
312 'gtm_enable': $('input[name="wpfnl-gtm-enable"]:checked').val(),
313 'gtm_container_id': $('#wpfnl-gtm-container-id').val(),
314 'gtm_events': gtmEvents,
315 'enable_fb_pixel': $('input[name="wpfnl-facebook-pixel-enable"]:checked').val(),
316 'fb_tracking_code': $('#wpfnl-facebook-tracking-code').val(),
317 'fb_tracking_events': fbTrackEvent,
318 'utm_enable': $('input[name="wpfnl-utm-enable"]:checked').val(),
319 'utm_source': $('#wpfnl-utm-source').val(),
320 'utm_medium': $('#wpfnl-utm-medium').val(),
321 'utm_campaign': $('#wpfnl-utm-campaign').val(),
322 'utm_content': $('#wpfnl-utm-content').val(),
323 'disable_theme_style': $('#disable-theme-style').is(':checked') ? 'on' : 'off',
324 'enable_log_status': $('#enable-log-status').is(':checked') ? 'on' : 'off',
325 'enable_skip_cart': $('#enable-skip-cart').is(':checked') ? 'on' : 'off',
326 'skip_cart_for': $('input[name="skip-cart"]:checked').val(),
327 'enable_recaptcha': $('input[name="wpfnl-recapcha-enable"]:checked').val(),
328 'recaptcha_site_key': $('#wpfnl-recapcha-site-key').val(),
329 'recaptcha_site_secret': $('#wpfnl-recapcha-site-secret').val(),
330 'user_role_management': { roles: userRoleManagement },
331 'google_map_api_key' : $('#wpfnl-google-map-api-key').val(),
332 'enable_global_thankyou' : $('#wpfnl-enable-global-thankyou').is(':checked') ? 'on' : 'off',
333 'lms_provider' : $('#lms-provider-select').val(),
334 'enable_revenue_report' : $('#wpfnl-enable-revenue-report').is(':checked') ? 'yes' : 'no',
335 'revenue_report_frequency' : $('input[name="wpfnl-revenue-report-frequency"]:checked').val(),
336 'revenue_report_recipient' : $('#wpfnl-revenue-report-recipient').val(),
337 'revenue_report_subject' : $('#wpfnl-revenue-report-subject').val(),
338 'send_time' : $('#wpfnl-send-time').val(),
339
340 // AI Assistant and MCP settings are owned entirely by their own
341 // Vue apps and REST endpoints now (see admin/src/settings-ai) —
342 // each field there saves itself immediately. Do NOT send
343 // ai_enabled/ai_provider/ai_*_key/ai_custom_instructions/
344 // mcp_enabled here: those selectors target markup that no
345 // longer exists, so they always resolved to falsy/blank and
346 // silently overwrote (disabled) whatever the Vue apps had just
347 // saved the moment this button was clicked.
348 };
349
350 var thisLoader = $(this).find('.wpfnl-loader');
351 var thisAlert = $(this).siblings('.wpfnl-alert');
352
353 thisLoader.fadeIn(); //show loader
354
355 wpAjaxHelperRequest("update-general-settings", payload)
356 .success(function (response) {
357 thisLoader.fadeOut();
358 $('#wpfnl-toaster-wrapper').addClass('quick-toastify-successful-notification');
359
360 $('#wpfnl-toaster-icon').html('<svg width="26" height="26" fill="none" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path fill="#4BAE4F" fill-rule="evenodd" d="M13 0C5.83 0 0 5.83 0 13s5.83 13 13 13 13-5.83 13-13S20.17 0 13 0z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M19.287 8.618a.815.815 0 010 1.148l-7.617 7.617a.812.812 0 01-1.148 0l-3.808-3.809a.815.815 0 010-1.147.815.815 0 011.147 0l3.235 3.234 7.044-7.043a.806.806 0 011.147 0z" clip-rule="evenodd"/></svg>');
361
362 $('#wpfnl-toaster-message').html('Saved Successfully')
363 $('#wpfnl-toaster-wrapper').show();
364
365 setTimeout(function() {
366 $('#wpfnl-toaster-wrapper').removeClass('quick-toastify-successful-notification');
367 $('#wpfnl-toaster-wrapper').hide(); 
368 }, 2000);
369
370 })
371 .error(function (response) {
372 thisLoader.fadeOut();
373 $('#wpfnl-toaster-wrapper').addClass('quick-toastify-warn-notification');
374
375 $('#wpfnl-toaster-icon').html('<svg width="26" height="26" fill="none" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path fill="#EC5956" fill-rule="evenodd" d="M26 13c0 7.18-5.82 13-13 13S0 20.18 0 13 5.82 0 13 0s13 5.82 13 13zm-11.375 6.5a1.625 1.625 0 11-3.25 0 1.625 1.625 0 013.25 0zM13 4.875c-.898 0-1.625.728-1.625 1.625V13a1.625 1.625 0 103.25 0V6.5c0-.897-.727-1.625-1.625-1.625z" clip-rule="evenodd"/></svg>');
376
377 $('#wpfnl-toaster-message').html('Erorr occurred')
378 $('#wpfnl-toaster-wrapper').show();
379 setTimeout(function() {
380 $('#wpfnl-toaster-wrapper').removeClass('quick-toastify-warn-notification');
381 $('#wpfnl-toaster-wrapper').hide(); 
382 }, 2000);
383 });
384
385 };
386
387
388 GeneralSettingsHandler.prototype.clearTemplates = function (e) {
389 e.preventDefault();
390
391 var $btn = $(this);
392 var sync_icon = $btn.find('.icon-sync');
393 var check_icon = $btn.find('.check-icon');
394 var $textSpan = $btn.find('.sync-btn-text');
395 var thisAlert = $btn.siblings('.wpfnl-alert');
396
397 sync_icon.addClass('sync-icon');
398
399 var payload = {};
400 wpAjaxHelperRequest("clear-templates", payload)
401 .success(function (response) {
402 sync_icon.hide();
403 check_icon.fadeIn();
404
405 // Change text and add success style
406 $textSpan.addClass('success');
407 $textSpan.text('Templates synced successfully');
408 $btn.css({
409 'border-color': '#239654',
410 });
411
412 setTimeout(function () {
413 sync_icon.removeClass('sync-icon').show();
414 check_icon.hide();
415
416 // Restore original text and style
417 $textSpan.text('Sync Templates');
418 $textSpan.removeClass('success');
419 $btn.css({
420 'border-color': '',
421 });
422 }, 2000);
423
424 $("#wpfnl-update-global-settings").trigger("click");
425 })
426
427 .error(function (response) {
428 setTimeout(function () {
429 thisAlert.fadeOut().text('').removeClass('wpfnl-error');
430 }, 2000);
431 console.log('error');
432 });
433 };
434
435
436
437 /**
438 * clear all transients related to wpfunnels
439 *
440 * @param e
441 */
442 GeneralSettingsHandler.prototype.clearTransients = function (e) {
443 e.preventDefault();
444 if (confirm('Are you sure you want to run this tool?')) {
445
446 var sync_icon = $(this).find('.sync-icon');
447 var check_icon = $(this).find('.check-icon');
448 var thisAlert = $(this).siblings('.wpfnl-alert');
449
450 sync_icon.show();
451
452 var payload = {};
453 wpAjaxHelperRequest("clear-transient", payload)
454 .success(function (response) {
455 sync_icon.hide();
456 check_icon.fadeIn();
457 thisAlert.text('Successful').addClass('wpfnl-success').fadeIn();
458
459 setTimeout(function () {
460 check_icon.hide();
461 thisAlert.fadeOut().text('').removeClass('wpfnl-success');
462 }, 4000);
463 $("#wpfnl-update-global-settings").trigger("click");
464 })
465
466 .error(function (response) {
467 thisAlert.text('Erorr occurred').addClass('wpfnl-error').fadeIn();
468
469 setTimeout(function () {
470 thisAlert.fadeOut().text('').removeClass('wpfnl-error');
471 }, 2000);
472 console.log('error');
473 });
474 }
475 };
476
477
478 GeneralSettingsHandler.prototype.clearTransients = function (e) {
479 e.preventDefault();
480 if (confirm('Are you sure you want to run this tool?')) {
481
482 var sync_icon = $(this).find('.sync-icon');
483 var check_icon = $(this).find('.check-icon');
484 var thisAlert = $(this).siblings('.wpfnl-alert');
485
486 sync_icon.show();
487
488 var payload = {};
489 wpAjaxHelperRequest("clear-transient", payload)
490 .success(function (response) {
491 sync_icon.hide();
492 check_icon.fadeIn();
493 thisAlert.text('Successful').addClass('wpfnl-success').fadeIn();
494
495 setTimeout(function () {
496 check_icon.hide();
497 thisAlert.fadeOut().text('').removeClass('wpfnl-success');
498 }, 4000);
499 $("#wpfnl-update-global-settings").trigger("click");
500 })
501
502 .error(function (response) {
503 thisAlert.text('Erorr occurred').addClass('wpfnl-error').fadeIn();
504
505 setTimeout(function () {
506 thisAlert.fadeOut().text('').removeClass('wpfnl-error');
507 }, 2000);
508
509 console.log('error');
510 });
511 }
512 };
513
514 new GeneralSettingsHandler();
515
516 $('.inner-tab').on('click', function () {
517 $('.inner-tab').removeClass('active');
518 $('.wpfnl-tab-content').removeClass('active');
519
520 $(this).addClass('active');
521 var tabId = $(this).data('tab');
522 $('#' + tabId).addClass('active');
523 });
524
525 // Send test notification
526 $('#wpfnl-send-test-notification').on('click', function(e) {
527 e.preventDefault();
528
529 var $button = $(this);
530 var $loader = $button.find('.wpfnl-loader');
531 var email = $('#wpfnl-test-notification-email').val();
532
533 if (!email || !isValidEmail(email)) {
534 showToaster('error', 'Please enter a valid email address');
535 return;
536 }
537
538 $button.prop('disabled', true);
539 $loader.fadeIn();
540
541 var payload = {
542 'email': email
543 };
544
545 wpAjaxHelperRequest('wpfnl-send-test-notification', payload)
546 .success(function(response) {
547 $loader.fadeOut();
548 $button.prop('disabled', false);
549
550 if (response.success) {
551 showToaster('success', response.message);
552 } else {
553 showToaster('error', response.message);
554 }
555 })
556 .error(function(response) {
557 $loader.fadeOut();
558 $button.prop('disabled', false);
559 showToaster('error', 'Error occurred while sending test email');
560 });
561 });
562
563 function isValidEmail(email) {
564 var regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
565 return regex.test(email);
566 }
567
568 function showToaster(type, message) {
569 var iconHtml = type === 'success'
570 ? '<svg width="26" height="26" fill="none" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path fill="#4BAE4F" fill-rule="evenodd" d="M13 0C5.83 0 0 5.83 0 13s5.83 13 13 13 13-5.83 13-13S20.17 0 13 0z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M19.287 8.618a.815.815 0 010 1.148l-7.617 7.617a.812.812 0 01-1.148 0l-3.808-3.809a.815.815 0 010-1.147.815.815 0 011.147 0l3.235 3.234 7.044-7.043a.806.806 0 011.147 0z" clip-rule="evenodd"/></svg>'
571 : '<svg width="26" height="26" fill="none" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path fill="#EC5956" fill-rule="evenodd" d="M26 13c0 7.18-5.82 13-13 13S0 20.18 0 13 5.82 0 13 0s13 5.82 13 13zm-11.375 6.5a1.625 1.625 0 11-3.25 0 1.625 1.625 0 013.25 0zM13 4.875c-.898 0-1.625.728-1.625 1.625V13a1.625 1.625 0 103.25 0V6.5c0-.897-.727-1.625-1.625-1.625z" clip-rule="evenodd"/></svg>';
572
573 var notificationClass = type === 'success' ? 'quick-toastify-successful-notification' : 'quick-toastify-warn-notification';
574
575 $('#wpfnl-toaster-wrapper').addClass(notificationClass);
576 $('#wpfnl-toaster-icon').html(iconHtml);
577 $('#wpfnl-toaster-message').html(message);
578 $('#wpfnl-toaster-wrapper').show();
579
580 setTimeout(function() {
581 $('#wpfnl-toaster-wrapper').removeClass(notificationClass);
582 $('#wpfnl-toaster-wrapper').hide();
583 }, 3000);
584 }
585
586 });
587
588 });
589