Changeset 3246269
- Timestamp:
- 02/25/2025 08:53:29 AM (12 months ago)
- Location:
- adcaptcha
- Files:
-
- 16 edited
- 1 copied
-
tags/1.6.0 (copied) (copied from adcaptcha/trunk)
-
tags/1.6.0/README.md (modified) (1 diff)
-
tags/1.6.0/adcaptcha.php (modified) (2 diffs)
-
tags/1.6.0/readme.txt (modified) (3 diffs)
-
tags/1.6.0/src/Plugin/Woocommerce/Checkout.php (modified) (1 diff)
-
tags/1.6.0/src/Settings/Advanced.php (modified) (3 diffs)
-
tags/1.6.0/src/Settings/Settings.php (modified) (1 diff)
-
tags/1.6.0/vendor/composer/InstalledVersions.php (modified) (4 diffs)
-
tags/1.6.0/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/README.md (modified) (1 diff)
-
trunk/adcaptcha.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/src/Plugin/Woocommerce/Checkout.php (modified) (1 diff)
-
trunk/src/Settings/Advanced.php (modified) (3 diffs)
-
trunk/src/Settings/Settings.php (modified) (1 diff)
-
trunk/vendor/composer/InstalledVersions.php (modified) (4 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
adcaptcha/tags/1.6.0/README.md
r3196276 r3246269 41 41 ### Fluent Forms 42 42 43 ## Advance Features 44 45 * Able to trigger adCAPTCHA on the "Place order" button. 46 * Able to disable the WooCommerce checkout endpoint. This will help prevent unauthorised request, for example stopping credit card fraud. 47 43 48 ## Privacy Notices 44 49 -
adcaptcha/tags/1.6.0/adcaptcha.php
r3219515 r3246269 3 3 * Plugin Name: adCAPTCHA for WordPress 4 4 * Description: Secure your site. Elevate your brand. Boost Ad Revenue. 5 * Version: 1. 5.55 * Version: 1.6.0 6 6 * Requires at least: 6.4.2 7 7 * Requires PHP: 7.4 … … 22 22 use AdCaptcha\Instantiate; 23 23 24 const PLUGIN_VERSION_ADCAPTCHA = '1. 5.5';24 const PLUGIN_VERSION_ADCAPTCHA = '1.6.0'; 25 25 define('ADCAPTCHA_ERROR_MESSAGE', __( 'Please complete the I am human box.', 'adcaptcha' )); 26 26 27 // Deletes data saved in the wp db on plugin uninstall 27 if ( ! function_exists( 'adcaptcha_uninstall' ) ) { 28 // Deletes data saved in the wp db on plugin uninstall 29 function adcaptcha_uninstall() { 30 delete_option( 'adcaptcha_api_key' ); 31 delete_option( 'adcaptcha_placement_id' ); 32 delete_option( 'adcaptcha_render_captcha' ); 33 delete_option( 'adcaptcha_selected_plugins' ); 34 delete_option( 'experimental_disable_wc_checkout_endpoint' ); 35 delete_option( 'adcaptcha_wc_checkout_optional_trigger' ); 36 } 37 } 38 28 39 register_uninstall_hook( __FILE__, 'adcaptcha_uninstall' ); 29 30 function adcaptcha_uninstall() {31 delete_option( 'adcaptcha_api_key' );32 delete_option( 'adcaptcha_placement_id' );33 delete_option( 'adcaptcha_render_captcha' );34 delete_option( 'adcaptcha_selected_plugins' );35 }36 40 37 41 $instantiate = new Instantiate(); -
adcaptcha/tags/1.6.0/readme.txt
r3219515 r3246269 5 5 Requires at least: 6.0 6 6 Tested up to: 6.5.2 7 Stable tag: 1. 5.57 Stable tag: 1.6.0 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 46 46 47 47 **Fluent Forms** 48 49 == Advance Features == 50 51 **Woocommerce** 52 53 * Able to trigger adCAPTCHA on the "Place order" button. 54 * Able to disable the WooCommerce checkout endpoint. This will help prevent unauthorised request, for example stopping credit card fraud. 48 55 49 56 == Installation == … … 148 155 - Minor update to ContactForm7: Added the ability to manually place adCAPTCHA. 149 156 - If not configured manually, it will default to appearing above the submit button. 157 158 = 1.6.0 = 159 - Added feature to disable the WooCommerce checkout endpoint. -
adcaptcha/tags/1.6.0/src/Plugin/Woocommerce/Checkout.php
r3219515 r3246269 27 27 add_action('woocommerce_payment_complete', [ $this, 'reset_hasVerified' ]); 28 28 add_action( 'woocommerce_checkout_process', [ $this, 'verify' ] ); 29 if (get_option('experimental_disable_wc_checkout_endpoint')) { 30 add_action('rest_api_init', [ $this, 'disable_wc_endpoint_v1' ]); 31 } 29 32 } 33 34 public function disable_wc_endpoint_v1() { 35 $current_url = $_SERVER['REQUEST_URI']; 36 if (strpos($current_url, '/wp-json/wc/store/v1/checkout') !== false || strpos($current_url, '/wp-json/wc/store/checkout') !== false) { 37 wp_redirect(home_url('/404.php')); 38 exit; 39 } 40 } 41 30 42 31 43 public function verify() { -
adcaptcha/tags/1.6.0/src/Settings/Advanced.php
r3219515 r3246269 15 15 $wc_checkout = isset($_POST['adcaptcha_advance']['wc-checkout']) ? sanitize_text_field(wp_unslash($_POST['adcaptcha_advance']['wc-checkout'])) : ''; 16 16 update_option('adcaptcha_wc_checkout_optional_trigger', $wc_checkout); 17 18 $experimental_disable_wc_checkout_endpoint = isset($_POST['adcaptcha_advance']['experimental_disable_wc_checkout_endpoint']) ? sanitize_text_field(wp_unslash($_POST['adcaptcha_advance']['experimental_disable_wc_checkout_endpoint'])) : ''; 19 update_option('experimental_disable_wc_checkout_endpoint', $experimental_disable_wc_checkout_endpoint); 17 20 } 18 21 … … 26 29 <?php 27 30 $checked = get_option('adcaptcha_wc_checkout_optional_trigger') ? 'checked' : ''; 31 $checked_experimental = get_option('experimental_disable_wc_checkout_endpoint') ? 'checked' : ''; 28 32 ?> 29 33 <h2 style="font-size:x-large;">Woocommerce</h2> … … 32 36 <input type="checkbox" id="wc-checkout" name="adcaptcha_advance[wc-checkout]" value="wc-checkout" <?php echo $checked; ?>> 33 37 <label class="checkbox-label" for="wc-checkout">Enable to trigger adCAPTCHA on the "Place order" button.</label><br> 38 </div> 39 <div class="checkbox-container"> 40 <h4 style="padding-right: 20px; font-size:medium;">Disable Checkout Endpoint:</h4> 41 <input type="checkbox" id="wc-checkout" name="adcaptcha_advance[experimental_disable_wc_checkout_endpoint]" value="experimental_disable_wc_checkout_endpoint" <?php echo $checked_experimental; ?>> 42 <label class="checkbox-label" for="wc-checkout">Enable to disable the WooCommerce checkout endpoint. This will help prevent unauthorised request, for example stopping credit card fraud.</label><br> 34 43 </div> 35 44 </div> -
adcaptcha/tags/1.6.0/src/Settings/Settings.php
r3219515 r3246269 82 82 83 83 public function change_admin_footer_version() { 84 return 'Version 1. 5.5';84 return 'Version 1.6.0'; 85 85 } 86 86 } -
adcaptcha/tags/1.6.0/vendor/composer/InstalledVersions.php
r3219515 r3246269 32 32 */ 33 33 private static $installed; 34 35 /** 36 * @var bool 37 */ 38 private static $installedIsLocalDir; 34 39 35 40 /** … … 310 315 self::$installed = $data; 311 316 self::$installedByVendor = array(); 317 318 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 319 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 320 // so we have to assume it does not, and that may result in duplicate data being returned when listing 321 // all installed packages for example 322 self::$installedIsLocalDir = false; 312 323 } 313 324 … … 326 337 327 338 if (self::$canGetVendors) { 339 $selfDir = strtr(__DIR__, '\\', '/'); 328 340 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 341 $vendorDir = strtr($vendorDir, '\\', '/'); 329 342 if (isset(self::$installedByVendor[$vendorDir])) { 330 343 $installed[] = self::$installedByVendor[$vendorDir]; … … 334 347 self::$installedByVendor[$vendorDir] = $required; 335 348 $installed[] = $required; 336 if (s trtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {349 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 337 350 self::$installed = $required; 338 $copiedLocalDir = true;351 self::$installedIsLocalDir = true; 339 352 } 353 } 354 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 355 $copiedLocalDir = true; 340 356 } 341 357 } -
adcaptcha/tags/1.6.0/vendor/composer/installed.php
r3219515 r3246269 2 2 'root' => array( 3 3 'name' => 'adcaptcha/plugin', 4 'pretty_version' => '1. 5.5',5 'version' => '1. 5.5.0',6 'reference' => ' 7dee3f7c2ba96edd9847dd891f4b7aef77995d4f',4 'pretty_version' => '1.6.0', 5 'version' => '1.6.0.0', 6 'reference' => '9f8ef06153c6398135d1ea1b3e5c551d650fd877', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'adcaptcha/plugin' => array( 14 'pretty_version' => '1. 5.5',15 'version' => '1. 5.5.0',16 'reference' => ' 7dee3f7c2ba96edd9847dd891f4b7aef77995d4f',14 'pretty_version' => '1.6.0', 15 'version' => '1.6.0.0', 16 'reference' => '9f8ef06153c6398135d1ea1b3e5c551d650fd877', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
adcaptcha/trunk/README.md
r3196276 r3246269 41 41 ### Fluent Forms 42 42 43 ## Advance Features 44 45 * Able to trigger adCAPTCHA on the "Place order" button. 46 * Able to disable the WooCommerce checkout endpoint. This will help prevent unauthorised request, for example stopping credit card fraud. 47 43 48 ## Privacy Notices 44 49 -
adcaptcha/trunk/adcaptcha.php
r3219515 r3246269 3 3 * Plugin Name: adCAPTCHA for WordPress 4 4 * Description: Secure your site. Elevate your brand. Boost Ad Revenue. 5 * Version: 1. 5.55 * Version: 1.6.0 6 6 * Requires at least: 6.4.2 7 7 * Requires PHP: 7.4 … … 22 22 use AdCaptcha\Instantiate; 23 23 24 const PLUGIN_VERSION_ADCAPTCHA = '1. 5.5';24 const PLUGIN_VERSION_ADCAPTCHA = '1.6.0'; 25 25 define('ADCAPTCHA_ERROR_MESSAGE', __( 'Please complete the I am human box.', 'adcaptcha' )); 26 26 27 // Deletes data saved in the wp db on plugin uninstall 27 if ( ! function_exists( 'adcaptcha_uninstall' ) ) { 28 // Deletes data saved in the wp db on plugin uninstall 29 function adcaptcha_uninstall() { 30 delete_option( 'adcaptcha_api_key' ); 31 delete_option( 'adcaptcha_placement_id' ); 32 delete_option( 'adcaptcha_render_captcha' ); 33 delete_option( 'adcaptcha_selected_plugins' ); 34 delete_option( 'experimental_disable_wc_checkout_endpoint' ); 35 delete_option( 'adcaptcha_wc_checkout_optional_trigger' ); 36 } 37 } 38 28 39 register_uninstall_hook( __FILE__, 'adcaptcha_uninstall' ); 29 30 function adcaptcha_uninstall() {31 delete_option( 'adcaptcha_api_key' );32 delete_option( 'adcaptcha_placement_id' );33 delete_option( 'adcaptcha_render_captcha' );34 delete_option( 'adcaptcha_selected_plugins' );35 }36 40 37 41 $instantiate = new Instantiate(); -
adcaptcha/trunk/readme.txt
r3219515 r3246269 5 5 Requires at least: 6.0 6 6 Tested up to: 6.5.2 7 Stable tag: 1. 5.57 Stable tag: 1.6.0 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 46 46 47 47 **Fluent Forms** 48 49 == Advance Features == 50 51 **Woocommerce** 52 53 * Able to trigger adCAPTCHA on the "Place order" button. 54 * Able to disable the WooCommerce checkout endpoint. This will help prevent unauthorised request, for example stopping credit card fraud. 48 55 49 56 == Installation == … … 148 155 - Minor update to ContactForm7: Added the ability to manually place adCAPTCHA. 149 156 - If not configured manually, it will default to appearing above the submit button. 157 158 = 1.6.0 = 159 - Added feature to disable the WooCommerce checkout endpoint. -
adcaptcha/trunk/src/Plugin/Woocommerce/Checkout.php
r3219515 r3246269 27 27 add_action('woocommerce_payment_complete', [ $this, 'reset_hasVerified' ]); 28 28 add_action( 'woocommerce_checkout_process', [ $this, 'verify' ] ); 29 if (get_option('experimental_disable_wc_checkout_endpoint')) { 30 add_action('rest_api_init', [ $this, 'disable_wc_endpoint_v1' ]); 31 } 29 32 } 33 34 public function disable_wc_endpoint_v1() { 35 $current_url = $_SERVER['REQUEST_URI']; 36 if (strpos($current_url, '/wp-json/wc/store/v1/checkout') !== false || strpos($current_url, '/wp-json/wc/store/checkout') !== false) { 37 wp_redirect(home_url('/404.php')); 38 exit; 39 } 40 } 41 30 42 31 43 public function verify() { -
adcaptcha/trunk/src/Settings/Advanced.php
r3219515 r3246269 15 15 $wc_checkout = isset($_POST['adcaptcha_advance']['wc-checkout']) ? sanitize_text_field(wp_unslash($_POST['adcaptcha_advance']['wc-checkout'])) : ''; 16 16 update_option('adcaptcha_wc_checkout_optional_trigger', $wc_checkout); 17 18 $experimental_disable_wc_checkout_endpoint = isset($_POST['adcaptcha_advance']['experimental_disable_wc_checkout_endpoint']) ? sanitize_text_field(wp_unslash($_POST['adcaptcha_advance']['experimental_disable_wc_checkout_endpoint'])) : ''; 19 update_option('experimental_disable_wc_checkout_endpoint', $experimental_disable_wc_checkout_endpoint); 17 20 } 18 21 … … 26 29 <?php 27 30 $checked = get_option('adcaptcha_wc_checkout_optional_trigger') ? 'checked' : ''; 31 $checked_experimental = get_option('experimental_disable_wc_checkout_endpoint') ? 'checked' : ''; 28 32 ?> 29 33 <h2 style="font-size:x-large;">Woocommerce</h2> … … 32 36 <input type="checkbox" id="wc-checkout" name="adcaptcha_advance[wc-checkout]" value="wc-checkout" <?php echo $checked; ?>> 33 37 <label class="checkbox-label" for="wc-checkout">Enable to trigger adCAPTCHA on the "Place order" button.</label><br> 38 </div> 39 <div class="checkbox-container"> 40 <h4 style="padding-right: 20px; font-size:medium;">Disable Checkout Endpoint:</h4> 41 <input type="checkbox" id="wc-checkout" name="adcaptcha_advance[experimental_disable_wc_checkout_endpoint]" value="experimental_disable_wc_checkout_endpoint" <?php echo $checked_experimental; ?>> 42 <label class="checkbox-label" for="wc-checkout">Enable to disable the WooCommerce checkout endpoint. This will help prevent unauthorised request, for example stopping credit card fraud.</label><br> 34 43 </div> 35 44 </div> -
adcaptcha/trunk/src/Settings/Settings.php
r3219515 r3246269 82 82 83 83 public function change_admin_footer_version() { 84 return 'Version 1. 5.5';84 return 'Version 1.6.0'; 85 85 } 86 86 } -
adcaptcha/trunk/vendor/composer/InstalledVersions.php
r3219515 r3246269 32 32 */ 33 33 private static $installed; 34 35 /** 36 * @var bool 37 */ 38 private static $installedIsLocalDir; 34 39 35 40 /** … … 310 315 self::$installed = $data; 311 316 self::$installedByVendor = array(); 317 318 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 319 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 320 // so we have to assume it does not, and that may result in duplicate data being returned when listing 321 // all installed packages for example 322 self::$installedIsLocalDir = false; 312 323 } 313 324 … … 326 337 327 338 if (self::$canGetVendors) { 339 $selfDir = strtr(__DIR__, '\\', '/'); 328 340 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 341 $vendorDir = strtr($vendorDir, '\\', '/'); 329 342 if (isset(self::$installedByVendor[$vendorDir])) { 330 343 $installed[] = self::$installedByVendor[$vendorDir]; … … 334 347 self::$installedByVendor[$vendorDir] = $required; 335 348 $installed[] = $required; 336 if (s trtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {349 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 337 350 self::$installed = $required; 338 $copiedLocalDir = true;351 self::$installedIsLocalDir = true; 339 352 } 353 } 354 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 355 $copiedLocalDir = true; 340 356 } 341 357 } -
adcaptcha/trunk/vendor/composer/installed.php
r3219515 r3246269 2 2 'root' => array( 3 3 'name' => 'adcaptcha/plugin', 4 'pretty_version' => '1. 5.5',5 'version' => '1. 5.5.0',6 'reference' => ' 7dee3f7c2ba96edd9847dd891f4b7aef77995d4f',4 'pretty_version' => '1.6.0', 5 'version' => '1.6.0.0', 6 'reference' => '9f8ef06153c6398135d1ea1b3e5c551d650fd877', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'adcaptcha/plugin' => array( 14 'pretty_version' => '1. 5.5',15 'version' => '1. 5.5.0',16 'reference' => ' 7dee3f7c2ba96edd9847dd891f4b7aef77995d4f',14 'pretty_version' => '1.6.0', 15 'version' => '1.6.0.0', 16 'reference' => '9f8ef06153c6398135d1ea1b3e5c551d650fd877', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.