Skip to content

Instantly share code, notes, and snippets.

@raphaklaus
Created April 6, 2018 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raphaklaus/3c6d26835e8357ea7a12c077372b50da to your computer and use it in GitHub Desktop.
Save raphaklaus/3c6d26835e8357ea7a12c077372b50da to your computer and use it in GitHub Desktop.
Woo Coupon Box JavaScript Close Bugfix
// wp-content/plugins/woo-coupon-box/js/wcb.js
// Replace in these functions: init_button() and widget_button() the popup_show() function which doesn't exist as follow:
function init_button() {
// ...
jQuery('.wcb-coupon-box').html(content);
jQuery('.wcb-widget-newsletter').html('<p class="vi-ps-sucesss"><i class="fa fa-check-square"></i>Thank you for subscribe</p>');
popup_hide();
} else {
console.log(html);
}
button.text(cr_text);
init_button();
// ...
}
function widget_button() {
// ...
jQuery('.wcb-coupon-box').html(content);
jQuery('.wcb-widget-newsletter').html('<p class="vi-ps-sucesss"><i class="fa fa-check-square"></i>Thank you for subscribe</p>');
popup_hide();
} else {
console.log(html);
}
button.text(cr_text);
init_button();
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment