Skip to content

Commit

Permalink
add doc to js
Browse files Browse the repository at this point in the history
  • Loading branch information
senadir committed Dec 16, 2024
1 parent e675a24 commit 777add9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/rcfwc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ jQuery( document ).ready(function() {
jQuery( document.body ).on( 'update_checkout updated_checkout applied_coupon_in_checkout removed_coupon_in_checkout checkout_error', function() {
if(jQuery('.g-recaptcha').length > 0) {
if (typeof grecaptcha !== "undefined" && typeof grecaptcha.reset === "function") {
console.log("Hello");
console.log(grecaptcha);
var count = 0;
jQuery(".g-recaptcha").each(function () {
grecaptcha.reset(count);
Expand All @@ -15,6 +13,7 @@ jQuery( document ).ready(function() {
});
});

/* Woo Checkout Block */
if ( wp && wp.data ) {
var unsubscribe = wp.data.subscribe(function() {
const recaptcha = document.querySelector('.g-recaptcha');
Expand Down

0 comments on commit 777add9

Please sign in to comment.