From 958376cafda96766153a9f5e398d260b192cac83 Mon Sep 17 00:00:00 2001 From: Cooper Dalrymple Date: Wed, 26 Aug 2026 17:27:07 -0500 Subject: [PATCH 1/4] Fix parameter count on hook --- inc/class-api.php | 2 +- inc/location/woocommerce/class-lost-password.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/class-api.php b/inc/class-api.php index cc39646..beee1c6 100644 --- a/inc/class-api.php +++ b/inc/class-api.php @@ -63,7 +63,7 @@ final class API { if (empty($token)) { $errors->add(self::ERROR_EMPTY_TOKEN, Plugin::__('Please complete CAPTCHA verification.')); - } else if (!API::verify($token)) { + } else if (!self::verify($token)) { $errors->add(self::ERROR_INVALID_CAPTCHA, Plugin::__('Your answer was incorrect - please try again.')); } diff --git a/inc/location/woocommerce/class-lost-password.php b/inc/location/woocommerce/class-lost-password.php index e7d1dbb..bb3562b 100644 --- a/inc/location/woocommerce/class-lost-password.php +++ b/inc/location/woocommerce/class-lost-password.php @@ -37,7 +37,7 @@ final class LostPassword extends Location { add_action('woocommerce_lostpassword_form', [$this, 'render']); add_action('woocommerce_after_lost_password_form', [$this, 'footer']); if (isset($_POST['woocommerce-lost-password-nonce'])) { - add_action('lostpassword_post', [$this, 'process_form']); + add_action('lostpassword_post', [$this, 'process_form'], 10, 2); } } -- 2.39.5 From 1539a6fc06046d6c15bb67b250be6a295386376f Mon Sep 17 00:00:00 2001 From: Cooper Dalrymple Date: Wed, 26 Aug 2026 17:27:26 -0500 Subject: [PATCH 2/4] Disable WC lost password... for now. Getting "Token not found" error. --- ogre-captcha.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogre-captcha.php b/ogre-captcha.php index 6c5c6b3..7ebd774 100644 --- a/ogre-captcha.php +++ b/ogre-captcha.php @@ -107,7 +107,7 @@ if (!class_exists('Ogre\Captcha')) { $this->add_files([ 'inc/location/woocommerce/class-checkout.php', 'inc/location/woocommerce/class-login.php', - 'inc/location/woocommerce/class-lost-password.php', + // 'inc/location/woocommerce/class-lost-password.php', 'inc/location/woocommerce/class-register.php', ]); } -- 2.39.5 From d1a2758514ce49d6a38dbb5221ea385241893616 Mon Sep 17 00:00:00 2001 From: Cooper Dalrymple Date: Wed, 26 Aug 2026 17:30:44 -0500 Subject: [PATCH 3/4] Nevermind, I figured it out. The standard lost password action was getting in the way. --- inc/location/class-lost-password-form.php | 4 +++- ogre-captcha.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/location/class-lost-password-form.php b/inc/location/class-lost-password-form.php index ffed418..1190768 100644 --- a/inc/location/class-lost-password-form.php +++ b/inc/location/class-lost-password-form.php @@ -34,7 +34,9 @@ final class LostPasswordForm extends LoginLocation { { parent::activate(); add_action('lostpassword_form', [$this, 'render']); - add_action('lostpassword_post', [$this, 'process_form'], 10, 1); + if (!isset($_POST['woocommerce-lost-password-nonce'])) { + add_action('lostpassword_post', [$this, 'process_form'], 10, 1); + } } public function process_form(WP_Error $errors):void { diff --git a/ogre-captcha.php b/ogre-captcha.php index 7ebd774..6c5c6b3 100644 --- a/ogre-captcha.php +++ b/ogre-captcha.php @@ -107,7 +107,7 @@ if (!class_exists('Ogre\Captcha')) { $this->add_files([ 'inc/location/woocommerce/class-checkout.php', 'inc/location/woocommerce/class-login.php', - // 'inc/location/woocommerce/class-lost-password.php', + 'inc/location/woocommerce/class-lost-password.php', 'inc/location/woocommerce/class-register.php', ]); } -- 2.39.5 From 04665817dfc43cacfdd7e70e177d67f1aad0cdf0 Mon Sep 17 00:00:00 2001 From: Cooper Dalrymple Date: Wed, 26 Aug 2026 17:33:08 -0500 Subject: [PATCH 4/4] Updated to version 1.2.9 --- composer.json | 2 +- composer.lock | 9 ++-- inc/class-api.php | 2 +- inc/location/class-lost-password-form.php | 2 +- .../woocommerce/class-lost-password.php | 2 +- ogre-captcha.php | 2 +- package-lock.json | 50 +++++++++---------- package.json | 2 +- readme.txt | 5 +- 9 files changed, 40 insertions(+), 36 deletions(-) diff --git a/composer.json b/composer.json index b6c1a4d..8dbab98 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "$schema": "https://getcomposer.org/schema.json", "name": "cleverogre/ogre-captcha", - "version": "1.2.8", + "version": "1.2.9", "title": "Ogre CAPTCHA", "description": "Protect your site with CAPTCHA", "author": "CleverOgre", diff --git a/composer.lock b/composer.lock index 2f21462..a51b4ed 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f65bf8d077abc18766530e9d520877ba", + "content-hash": "be46026a283f180e03369ac71487bc45", "packages": [ { "name": "cleverogre/plugin-framework", @@ -12,7 +12,7 @@ "source": { "type": "git", "url": "git@git.cleverogre.com:cleverogre/plugin-framework.git", - "reference": "74700a249ae3b5e559c071e2467764da4645a26f" + "reference": "cbea8dd02640b88b86091801adbb3da86a8bb55c" }, "require": { "cleverogre/plugin-update-checker": "dev-main", @@ -38,7 +38,8 @@ "inc/package-updater.php", "inc/acf.php", "inc/trait-singleton.php", - "inc/abstract-plugin.php" + "inc/abstract-plugin.php", + "inc/abstract-settings.php" ] }, "license": [ @@ -51,7 +52,7 @@ "Plugin", "WordPress" ], - "time": "2026-06-05T20:21:23+00:00" + "time": "2026-08-26T16:47:47+00:00" }, { "name": "cleverogre/plugin-update-checker", diff --git a/inc/class-api.php b/inc/class-api.php index beee1c6..2d7ab72 100644 --- a/inc/class-api.php +++ b/inc/class-api.php @@ -4,7 +4,7 @@ * @author cleverogre * @copyright 2026 CleverOgre * @license GLP-3.0-or-later - * @version 1.0.0 + * @version 1.2.9 * @since 1.0.0 */ diff --git a/inc/location/class-lost-password-form.php b/inc/location/class-lost-password-form.php index 1190768..cb0fc49 100644 --- a/inc/location/class-lost-password-form.php +++ b/inc/location/class-lost-password-form.php @@ -4,7 +4,7 @@ * @author cleverogre * @copyright 2026 CleverOgre * @license GLP-3.0-or-later - * @version 1.2.6 + * @version 1.2.9 * @since 1.0.0 */ diff --git a/inc/location/woocommerce/class-lost-password.php b/inc/location/woocommerce/class-lost-password.php index bb3562b..4962dc2 100644 --- a/inc/location/woocommerce/class-lost-password.php +++ b/inc/location/woocommerce/class-lost-password.php @@ -4,7 +4,7 @@ * @author cleverogre * @copyright 2026 CleverOgre * @license GLP-3.0-or-later - * @version 1.2.0 + * @version 1.2.9 * @since 1.0.0 */ diff --git a/ogre-captcha.php b/ogre-captcha.php index 6c5c6b3..9df828b 100644 --- a/ogre-captcha.php +++ b/ogre-captcha.php @@ -13,7 +13,7 @@ * Plugin Name: Ogre CAPTCHA * Plugin URI: https://git.cleverogre.com/cleverogre/ogre-captcha/ * Description: Protect your site with CAPTCHA - * Version: 1.2.8 + * Version: 1.2.9 * Requires at least: 6.0 * Requires PHP: 8.2 * Author: CleverOgre diff --git a/package-lock.json b/package-lock.json index 39ca67e..11c1477 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cleverogre/ogre-captcha", - "version": "1.2.8", + "version": "1.2.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cleverogre/ogre-captcha", - "version": "1.2.8", + "version": "1.2.9", "license": "GPL-3.0+", "devDependencies": { "gulp": "^5.0.0", @@ -58,9 +58,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "26.1.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.1.tgz", - "integrity": "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==", + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.3.0.tgz", + "integrity": "sha512-L3fgrnchriRC2ExBflb8j4uZZURHZfQsmQeyVzhjcHW4kkwVyo8/0h1B2MVzMTrYUJYu6G7EWs14hW/L9putqw==", "dev": true, "license": "MIT", "dependencies": { @@ -380,9 +380,9 @@ } }, "node_modules/bare-events": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.9.1.tgz", - "integrity": "sha512-Z0oHEHAFDZkffN8Qc39zNZjQlMDkPJRyyyZieU1VH7u8c5S+qHZ2S8ixdKIAxEjfHO7FJxXmJWgteOghVanIsg==", + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.9.2.tgz", + "integrity": "sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==", "dev": true, "license": "Apache-2.0", "peerDependencies": { @@ -488,16 +488,16 @@ } }, "node_modules/brace-expansion": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz", - "integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" } }, "node_modules/braces": { @@ -1769,9 +1769,9 @@ "license": "MIT" }, "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", - "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", + "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", "dev": true, "license": "MIT", "dependencies": { @@ -2815,9 +2815,9 @@ } }, "node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.1.0.tgz", + "integrity": "sha512-bUi/yjmtKYcRVUtWRGr0UA6xEFh2I6zWUwMrUXB3s7bmYCaZ8a+0ZsTRkrawh/mzlSD1Y0Ph8bp/U+TvBpWDNw==", "dev": true, "license": "MIT", "engines": { @@ -3232,13 +3232,13 @@ } }, "node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.5" + "brace-expansion": "^5.0.8" }, "engines": { "node": "18 || 20 || >=22" @@ -4477,9 +4477,9 @@ "license": "MIT" }, "node_modules/streamx": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.28.0.tgz", - "integrity": "sha512-1Yowhzjf0ivGMrTIkY9hav5TxobO9qIVqUE41fiCGMGgc3CLlf4MY+9AHmZqBWgDTue0fY9zWjYFVyf6Diuobw==", + "version": "2.28.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.28.1.tgz", + "integrity": "sha512-zEzXb0s5Cds7tqMH6rhZ05lcJydCWiQPEwiNngVqzsxCc962vLY4Uw+mW7od8kDH258k2Uz/JrOkdIAAhSh9VA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 438daf2..0930e34 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://www.schemastore.org/package.json", "name": "cleverogre/ogre-captcha", - "version": "1.2.8", + "version": "1.2.9", "title": "Ogre CAPTCHA", "description": "Protect your site with CAPTCHA", "author": "CleverOgre", diff --git a/readme.txt b/readme.txt index 9977b7f..37cd1a9 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: ogrecooper, cleverogre Tested up to: 7.0 Requires at least: 6.0 Requires PHP: 8.2 -Version: 1.2.8 +Version: 1.2.9 License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl-3.0.html Copyright: CleverOgre @@ -28,6 +28,9 @@ If you don't know what plugin you have downloaded, please contact [CleverOgre](t == Changelog == += 1.2.9 - 2026-08-26 = +* Fix WooCommerce lost password form + = 1.2.8 - 2026-08-19 = * Fix compatibility issue with Gravity Perks Nested Forms -- 2.39.5