Pass checkout submit result to triggered handler

This commit is contained in:
Krzysztof Grabania 2021-02-26 11:55:49 +01:00
parent 422002a2a8
commit 626dcb1fb1
1 changed files with 1 additions and 1 deletions

View File

@ -525,7 +525,7 @@ jQuery( function( $ ) {
wc_checkout_form.detachUnloadEventsOnSubmit();
try {
if ( 'success' === result.result && $form.triggerHandler( 'checkout_place_order_success' ) !== false ) {
if ( 'success' === result.result && $form.triggerHandler( 'checkout_place_order_success', result ) !== false ) {
if ( -1 === result.redirect.indexOf( 'https://' ) || -1 === result.redirect.indexOf( 'http://' ) ) {
window.location = result.redirect;
} else {