hello friends I have a web page with a theme that uses notify.js to send an alert (small modal) when you add a product to the shopping cart, everything was working fine in wordpress version 5.5.3, but for security to vulnerabilities that it has version I have had to update my wordpress and the notification has been broken, it only shows the empty modal without the information of the product name or the message that it has been added to the cart.
If someone has had this same problem and knows the solution, I would be very grateful.
This is the javascript code of the plugin:
helendo.showAddedToCartNotice = function () {
$( document.body ).on( 'added_to_cart', function ( event, fragments, cart_hash, $thisbutton ) {
var product_title = $thisbutton.attr( 'data-title' ) + ' ' + helendoData.l10n.notice_text,
$message = '';
helendo.addedToCartNotice( $message, product_title, false, 'success' );
} );
};
helendo.addedToCartNotice = function ( $message, $content, single, className ) {
if ( helendoData.l10n.added_to_cart_notice != '1' || !$.fn.notify ) {
return;
}
$message += '<a href="' + helendoData.l10n.cart_link + '" class="btn-button">' + helendoData.l10n.cart_text + '</a>';
if ( single ) {
$message = '<div class="message-box">' + $message + '</div>';
}
$.notify.addStyle( 'helendo', {
html: '<div><i class="icon-checkmark-circle message-icon"></i><span data-notify-text/>' + $message + '<span class="close icon-cross2"></span> </div>'
} );
$.notify( $content, {
autoHideDelay: helendoData.l10n.cart_notice_auto_hide,
className : className,
style : 'helendo',
showAnimation: 'fadeIn',
hideAnimation: 'fadeOut'
} );
};