| Server IP : _ / Your IP : 169.254.129.1 Web Server : nginx/1.28.0 System : Linux 89e302d72aa1 6.6.143.1-1.azl3 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 04:01:14 UTC 2026 x86_64 User : nginx ( 103) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wordpress/wp-content/plugins/wpforms/assets/js/integrations/woocommerce/ |
Upload File : |
/* global wpforms_woocommerce_notifications */
/**
* WooCommerce Notifications integration script.
*
* @since 1.8.9
*/
const WPFormsWoocommerceNotifications = window.WPFormsWoocommerceNotifications || ( function( document, window, $ ) {
/**
* Public functions and properties.
*
* @since 1.8.9
*/
const app = {
/**
* Start the engine.
*
* @since 1.8.9
*/
init() {
$( app.ready );
},
/**
* Document ready.
*
* @since 1.8.9
*/
ready() {
app.events();
},
/**
* Events.
*
* @since 1.8.9
*/
events() {
$( '#wpforms-woocommerce-close' ).on( 'click', app.dismiss );
},
/**
* Hide notification.
*
* @since 1.8.9
*/
dismiss() {
const $btn = $( this );
const $notification = $btn.closest( '.wpforms-woocommerce-notification' );
$notification.remove();
const data = {
action: 'wpforms_woocommerce_dismiss',
nonce: wpforms_woocommerce_notifications.nonce,
};
$.post( wpforms_woocommerce_notifications.ajax_url, data, function( res ) {
if ( ! res.success ) {
// eslint-disable-next-line no-console
console.log( res );
}
} ).fail( function( xhr ) {
// eslint-disable-next-line no-console
console.log( xhr.responseText );
} );
},
};
return app;
}( document, window, jQuery ) );
// Initialize.
WPFormsWoocommerceNotifications.init();