Skip to content

Commit

Permalink
Merge pull request #66 from aait/master
Browse files Browse the repository at this point in the history
Add CheckoutWC support
  • Loading branch information
markusbrunke authored Feb 28, 2020
2 parents 1d39d02 + 119436f commit a526a78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion assets/js/checkout.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* global wc_checkout_params */
/* global Reepay */

// Preload ModalCheckout
window.rp = new Reepay.ModalCheckout();
Expand All @@ -12,7 +13,7 @@ jQuery( function( $ ) {
}

$( document ).ajaxComplete( function ( event, xhr, settings ) {
if ( settings.url === wc_checkout_params.checkout_url ) {
if ( ( settings.url === wc_checkout_params.checkout_url ) || ( settings.url.indexOf( 'wc-ajax=complete_order' ) > -1 ) ) {
const data = xhr.responseText;

// Parse
Expand Down
Loading

0 comments on commit a526a78

Please sign in to comment.