The bug is in AlertService.ts file.
messages is undefined here:
if ( messages.indexOf( '<script' ) !== -1 ) {
jQuery( document.body ).prepend( <div style="display:none">${messages}</div> );
}
-
This reply was modified 2 years, 2 months ago by
webmonk.
I found the fix for this.
In CompleteOrderAction.ts, you have triple “s” in resp.messages
AlertService.createAlertsFromMessages( resp.messsages );
if ( typeof resp.messages === 'string' && resp.messages.length ) { AlertService.createAlertsFromMessages( resp.messsages ); } else { /** * If the payment gateway comes back with no message, show a generic error. */ const message = DataService.getCheckoutParam( 'i18n_checkout_error' ).toString(); const rawResponse = JSON.stringify( resp, null, 2 ); const alert: Alert = new Alert( 'error', message, 'cfw-alert-error', ); AlertService.queueAlert( alert ); // Console log the error + raw response LoggingService.logError( ${message}\n\n${rawResponse} ); } // Trigger update in case we need a fresh nonce if ( resp.refresh === true ) { jQuery( document.body ).trigger( 'update_checkout' ); }
Do you have a github repository for this plugin? I can fix and submit a PR.
Hi there – so sorry about this. Fix is up now: 1.1.7
We’re going to setup monitoring so that we are notified more quickly of new bug reports / support requests.
(It’s manual currently because we usually hear about bugs from our Pro users first – but that didn’t work this time)
Great job tracking this down.