Changeset 3486218
- Timestamp:
- 03/19/2026 08:13:43 AM (9 days ago)
- Location:
- advanced-google-recaptcha/trunk
- Files:
-
- 3 edited
-
advanced-google-recaptcha.php (modified) (3 diffs)
-
libs/functions.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-google-recaptcha/trunk/advanced-google-recaptcha.php
r3336844 r3486218 4 4 Plugin URI: https://getwpcaptcha.com/ 5 5 Description: Advanced Google reCAPTCHA will safeguard your WordPress site from spam comments and brute force attacks. With this plugin, you can easily add Google reCAPTCHA to WordPress comment form, login form and other forms. 6 Version: 1.3 16 Version: 1.32 7 7 Author: WebFactory Ltd 8 8 Author URI: https://www.webfactoryltd.com/ … … 10 10 Text Domain: advanced-google-recaptcha 11 11 Requires at least: 4.9 12 Tested up to: 6. 812 Tested up to: 6.9 13 13 Requires PHP: 5.2 14 14 15 Copyright 2023 - 202 5WebFactory Ltd (email: [email protected])15 Copyright 2023 - 2026 WebFactory Ltd (email: [email protected]) 16 16 Copyright 2021 - 2023 WP Concern 17 17 … … 161 161 add_action( 'woocommerce_review_order_before_submit', array('WPCaptcha_Functions', 'login_scripts_print')); 162 162 add_action( 'woocommerce_checkout_process', array('WPCaptcha_Functions', 'check_woo_checkout_form')); 163 add_action( 'woocommerce_pay_order_before_submit', array('WPCaptcha_Functions', 'login_scripts_print'), 10); 164 add_action( 'woocommerce_pay_order_before_submit', array('WPCaptcha_Functions', 'captcha_fields_print'), 11); 165 add_action( 'woocommerce_before_pay_action', array('WPCaptcha_Functions', 'check_woo_order_pay')); 163 166 } 164 167 -
advanced-google-recaptcha/trunk/libs/functions.php
r3262396 r3486218 390 390 } 391 391 392 static function check_woo_order_pay() 393 { 394 $captcha_check = self::handle_captcha(); 395 if ( $captcha_check === true ) { 396 return; 397 } 398 399 if ( function_exists('wc_add_notice') ) { 400 wc_add_notice($captcha_check->get_error_message(), 'error'); 401 } 402 } 403 392 404 static function check_edd_register_form() 393 405 { … … 485 497 if (class_exists('woocommerce')) { 486 498 $output .= '<script> 487 jQuery("form.woocommerce-checkout").on("submit", function(){ 488 setTimeout(function(){ 499 function wpcaptcha_captcha_refresh() { 489 500 grecaptcha.reset(); 490 },100); 491 }); 501 } 502 503 jQuery(document.body).on("checkout_error", function(){ 504 setTimeout(wpcaptcha_captcha_refresh, 50); 505 }); 506 507 jQuery(document.body).on("updated_checkout", function(){ 508 setTimeout(wpcaptcha_captcha_refresh, 50); 509 }); 492 510 </script>'; 493 511 } … … 506 524 if (class_exists('woocommerce')) { 507 525 $output .= '<script> 508 jQuery("form.woocommerce-checkout").on("submit", function(){ 509 setTimeout(function(){ 510 wpcaptcha_captcha(); 511 },100); 526 jQuery(document.body).on("checkout_error", function(){ 527 setTimeout(wpcaptcha_captcha, 50); 528 }); 529 530 jQuery(document.body).on("updated_checkout", function(){ 531 setTimeout(wpcaptcha_captcha, 50); 512 532 }); 513 533 </script>'; … … 529 549 $options = WPCaptcha_Setup::get_options(); 530 550 if ($options['captcha'] == 'recaptchav2') { 531 wp_enqueue_script('wpcaptcha-recaptcha', 'https://www.google.com/recaptcha/api.js', array( ), self::$version, true);551 wp_enqueue_script('wpcaptcha-recaptcha', 'https://www.google.com/recaptcha/api.js', array('jquery'), self::$version, true); 532 552 } else if ($options['captcha'] == 'recaptchav3') { 533 wp_enqueue_script('wpcaptcha-recaptcha', 'https://www.google.com/recaptcha/api.js?onload=wpcaptcha_captcha&render=' . esc_html($options['captcha_site_key']), array( ), self::$version, true);553 wp_enqueue_script('wpcaptcha-recaptcha', 'https://www.google.com/recaptcha/api.js?onload=wpcaptcha_captcha&render=' . esc_html($options['captcha_site_key']), array('jquery'), self::$version, true); 534 554 } 535 555 } -
advanced-google-recaptcha/trunk/readme.txt
r3336844 r3486218 5 5 Requires at least: 4.9 6 6 Requires PHP: 5.6 7 Tested up to: 6. 88 Stable tag: 1.3 17 Tested up to: 6.9 8 Stable tag: 1.32 9 9 License: GPLv3 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 76 76 77 77 == Changelog == 78 = 1.32 - 19/03/2026 = 79 * added captcha to WooCommerce payment endpoint 80 * improved checkout error handling 81 78 82 = 1.31 - 30/07/2025 = 79 83 * minor code fixes
Note: See TracChangeset
for help on using the changeset viewer.