Solution:
I had similar problem. I wrote the custom jquery plugin and track the changing class on form.woocommerce-checkout
The code jquery plugin
(function(){
// Your base, I'm in it!
var originalAddClassMethod = jQuery.fn.addClass;
var originalRemoveClassMethod = jQuery.fn.removeClass;
jQuery.fn.addClass = function(){
// Execute the original method.
var result = originalAddClassMethod.apply( this, arguments );
// trigger a custom event
jQuery(this).trigger('cssClassChanged');
// return the original result
return result;
}
jQuery.fn.removeClass = function(){
// Execute the original method.
var result = originalRemoveClassMethod.apply( this, arguments );
// trigger a custom event
jQuery(this).trigger('cssClassChanged');
// return the original result
return result;
}
})();
The function track the changing form.woocommerce-checkout
jQuery(document).ready(function () {
jQuery('form.woocommerce-checkout').bind('cssClassChanged', function(){
if (jQuery(this).hasClass("processing")) {
// stripe is processing
} else {
// strpipe isn't processing
}
});
});
You need to add this code to your theme or plugin in js file