Skip to content

Commit

Permalink
Add CheckoutWC support
Browse files Browse the repository at this point in the history
  • Loading branch information
aait committed Feb 28, 2020
1 parent 2d323c2 commit 119436f
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 119436f

Please sign in to comment.