diff --git a/for-maintainers.md b/for-maintainers.md index ad8dc26..5906077 100644 --- a/for-maintainers.md +++ b/for-maintainers.md @@ -79,7 +79,7 @@ into GitHub Actions but can also be run locally. Launching: -`bash tools/run-tests.sh [all|wordpress|form-plugins] [local]` +`bash tools/run-tests.sh [all|form-plugins|form-plugins/formidable-forms] [local]` To open the Cypress app: diff --git a/prosopo-procaptcha/prosopo-procaptcha.php b/prosopo-procaptcha/prosopo-procaptcha.php index 6f115be..68dc281 100644 --- a/prosopo-procaptcha/prosopo-procaptcha.php +++ b/prosopo-procaptcha/prosopo-procaptcha.php @@ -2,7 +2,7 @@ /** * Plugin Name: Prosopo Procaptcha * Description: GDPR compliant, privacy friendly and better value captcha. - * Version: 1.20.0 + * Version: 1.20.1 * Author: Prosopo Team * Author URI: https://prosopo.io/ * License: GPLv2 or later diff --git a/prosopo-procaptcha/readme.txt b/prosopo-procaptcha/readme.txt index 2206574..470129b 100644 --- a/prosopo-procaptcha/readme.txt +++ b/prosopo-procaptcha/readme.txt @@ -4,7 +4,7 @@ Tags: Captcha, Procaptcha, antispam, anibot, spam. Requires at least: 5.5 Tested up to: 6.8 Requires PHP: 7.4 -Stable tag: 1.20.0 +Stable tag: 1.20.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -97,7 +97,7 @@ While only the items above are tested, overall, the Procaptcha plugin supports a 3. [JetPack](https://wordpress.org/plugins/jetpack/) (Forms) - Gutenberg form block: Add the Group block with the `prosopo_procaptcha` shortcode inside the target form block. 4. [WooCommerce](https://docs.prosopo.io/en/wordpress-plugin/woocommerce/) - My Account forms; Classic Checkout, Blocks Checkout, Order Tracking forms: enable protection in the `WooCommerce` tab of the plugin settings. 5. [Spectra](https://docs.prosopo.io/en/wordpress-plugin/spectra/) - Form block: add hidden input with the `prosopo_procaptcha` name -6. Beaver Builder - Contact, Subscribe forms: enabled protection in the target form settings; Login form: Procaptcha plugin settings->Account forms. +6. [Beaver Builder](https://wordpress.org/plugins/beaver-builder-lite-version/) - Contact, Subscribe forms: enabled protection in the target form settings; Login form: Procaptcha plugin settings->Account forms. **Built-In Integrations**: @@ -135,6 +135,9 @@ Absolutely! The plugin has a [public GitHub repository](https://github.com/proso == Changelog == += 1.20.1 (2025-08-21) = +Enhancement: compatibility with the latest WPForms version + = 1.20.0 (2025-06-03) = Fix: Procaptcha option in the Beaver builder modules diff --git a/prosopo-procaptcha/src/Plugin_Integrations/WPForms/WPForms_Integration.php b/prosopo-procaptcha/src/Plugin_Integrations/WPForms/WPForms_Integration.php index 4445b61..f7623e5 100644 --- a/prosopo-procaptcha/src/Plugin_Integrations/WPForms/WPForms_Integration.php +++ b/prosopo-procaptcha/src/Plugin_Integrations/WPForms/WPForms_Integration.php @@ -12,7 +12,17 @@ class WPForms_Integration extends Procaptcha_Plugin_Integration implements Hookable { public function get_target_plugin_classes(): array { return array( - 'WPForms\WPForms', + /** + * Instead of the main plugin class, we use the main field class. + * + * The reason is that the primary plugin class, 'WPForms\WPForms', itself is always loaded for all requests, + * but since recently contains the 'is_restricted_heartbeat()' method, + * which skips loading of the rest classes for most of the WordPress heartbeat requests. + * + * In this way, usage of the primary class would always create the Integration instances, + * which would try to extend the not-existing 'WPForms_Field' class. + */ + 'WPForms_Field', ); } diff --git a/tests/cypress/e2e/account-related-plugins/woocommerce/classes/woo-checkout-blocks.ts b/tests/cypress/e2e/account-related-plugins/woocommerce/classes/woo-checkout-blocks.ts index db13916..8c16928 100644 --- a/tests/cypress/e2e/account-related-plugins/woocommerce/classes/woo-checkout-blocks.ts +++ b/tests/cypress/e2e/account-related-plugins/woocommerce/classes/woo-checkout-blocks.ts @@ -1,6 +1,8 @@ import WooCheckoutClassic from "./woo-checkout-classic"; import { FormSubmitionSettings } from "@support/commands/submitForm"; +const INTERCEPT_REQUEST_TIMEOUT_MS = 30 * 1000; + class WooCheckoutBlocks extends WooCheckoutClassic { // Less, cause the form doesn't support auth. itemsCountToRemove = 2; @@ -47,7 +49,7 @@ class WooCheckoutBlocks extends WooCheckoutClassic { wpData.dispatch("wc/store/cart").setBillingAddress(billingFields); - cy.wait("@cartData"); + cy.wait("@cartData", { timeout: INTERCEPT_REQUEST_TIMEOUT_MS }); } protected setCaptchaValue(wpData, captchaValue: string): void { @@ -59,7 +61,8 @@ class WooCheckoutBlocks extends WooCheckoutClassic { "prosopo-procaptcha/prosopo_procaptcha": captchaValue, }); - cy.wait("@captchaValue"); + // for some reason, Woo doesn't always make this request - maybe only if the value was changed + // cy.wait("@captchaValue", { timeout: INTERCEPT_REQUEST_TIMEOUT_MS }); } /** diff --git a/tests/cypress/e2e/account-related-plugins/woocommerce/classes/woo-order-tracking.ts b/tests/cypress/e2e/account-related-plugins/woocommerce/classes/woo-order-tracking.ts index dea7473..f3e9b3d 100644 --- a/tests/cypress/e2e/account-related-plugins/woocommerce/classes/woo-order-tracking.ts +++ b/tests/cypress/e2e/account-related-plugins/woocommerce/classes/woo-order-tracking.ts @@ -16,7 +16,7 @@ class WooOrderTracking extends FormTest { captchaInput: "", }; this.submitValues = { - orderid: "1602", + orderid: "1712", order_email: "test@gmail.com", }; this.messages = { diff --git a/tests/cypress/e2e/form-plugins/everest-forms/classes/everest-forms-with-ajax.ts b/tests/cypress/e2e/form-plugins/everest-forms/classes/everest-forms-with-ajax.ts index 8770ba4..3c0624f 100644 --- a/tests/cypress/e2e/form-plugins/everest-forms/classes/everest-forms-with-ajax.ts +++ b/tests/cypress/e2e/form-plugins/everest-forms/classes/everest-forms-with-ajax.ts @@ -13,7 +13,11 @@ class EverestFormsWithAjax extends EverestForms { 'input[name="settings[ajax_form_submission]"][type=checkbox]', ); - true === isActivation ? setting.check() : setting.uncheck(); + // if the 'settings' tab is not active, then the input is hidden, + // so the "force" option is used to avoid the "Element is not visible" error. + true === isActivation + ? setting.check({ force: true }) + : setting.uncheck({ force: true }); cy.get(".everest-forms-save-button").click(); diff --git a/tests/cypress/e2e/form-plugins/formidable-forms/classes/formidable-forms.ts b/tests/cypress/e2e/form-plugins/formidable-forms/classes/formidable-forms.ts index 78f8d37..5bd8fca 100644 --- a/tests/cypress/e2e/form-plugins/formidable-forms/classes/formidable-forms.ts +++ b/tests/cypress/e2e/form-plugins/formidable-forms/classes/formidable-forms.ts @@ -18,8 +18,8 @@ class FormidableForms extends FormTest { "input[type=text][name*=item_meta]:not(.frm_verify)": "John Doe", }; this.messages = { - success: "Your responses were successfully submitted. Thank you!\n", - fail: "\n\tThere was a problem with your submission. Errors are marked below.", + success: "Your responses were successfully submitted. Thank you!", + fail: "There was a problem with your submission. Errors are marked below.", }; } } diff --git a/tests/cypress/e2e/form-plugins/jetpack/classes/jetpack.ts b/tests/cypress/e2e/form-plugins/jetpack/classes/jetpack.ts index 069fce7..420a322 100644 --- a/tests/cypress/e2e/form-plugins/jetpack/classes/jetpack.ts +++ b/tests/cypress/e2e/form-plugins/jetpack/classes/jetpack.ts @@ -18,8 +18,8 @@ class Jetpack extends FormTest { formWithCaptcha: ".jetpack-form-with-captcha", formWithoutCaptcha: ".jetpack-form-without-captcha", successMessage: "#contact-form-success-header", - errorMessage: ".form-error h3", - errorFieldMessage: ".form-errors", + errorMessage: ".contact-form__error", + errorFieldMessage: "", captchaInput: "", }; this.submitValues = { @@ -27,7 +27,8 @@ class Jetpack extends FormTest { }; this.messages = { success: "Your message has been sent", - fail: "Error!", + // as per 14.9.1, Jetpack shows a generic 'internet connection' issue for any form errors... + fail: "issue while submitting the form", }; }