diff --git a/angelleye-includes/angelleye-utility.php b/angelleye-includes/angelleye-utility.php index 50877a854..b120f52d2 100644 --- a/angelleye-includes/angelleye-utility.php +++ b/angelleye-includes/angelleye-utility.php @@ -1041,7 +1041,14 @@ public function angelleye_paypal_for_woocommerce_order_action_callback($post) { //Asking confirm for the capture $('#angelleye_payment_submit_button').on('click', function () { - return confirm('Are you sure?'); + var r = confirm('Are you sure?'); + if (r == true) { + jQuery("#angelleye-pw-order-action").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}) + return r; + } else { + jQuery("#angelleye-pw-order-action").unblock(); + return r; + } }) MutationObserver = window.MutationObserver || window.WebKitMutationObserver; diff --git a/assets/js/angelleye-admin.js b/assets/js/angelleye-admin.js index 3eef7f456..1b2593f5c 100644 --- a/assets/js/angelleye-admin.js +++ b/assets/js/angelleye-admin.js @@ -240,13 +240,6 @@ jQuery(document).ready(function ($) { } }).change(); - - - jQuery("#angelleye_payment_submit_button").click(function () { - jQuery("#angelleye-pw-order-action").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}) - }); - - jQuery('#angelleye_payment_action').change(function(){ if(jQuery(this).val() == 'DoCapture') {