impress-org / givewp

GiveWP - The #1 Donation Plugin for WordPress. Easily accept donations and fundraise using your WordPress website.
https://givewp.com/
GNU General Public License v3.0
340 stars 191 forks source link

[Form Action Hooks] should only run once in the form #6838

Closed emanuellopess closed 10 months ago

emanuellopess commented 1 year ago

User Story

As a developer, I want the form display actions to run only once, so that the display messages don't repeat.

Details

The problem appears to be that the new hooks are fired outside the form and multiple times, for example:

The depreceated action hook "give_before_donation_levels" display messages only once inside the form; The new action hook "give_fields_before_donation_levels" display messages multiple times and outside the form;

Expected Behavior

The new action hooks "givefields" runs only once inside the form.

Steps to Reproduce

  1. Add an action hook, give_fields_before_donation_levels for example;
  2. Add a function that display some message with "echo";
  3. View that the message appears multiple times.

Visuals

When using the depreceated hooks: image

When using the new hooks: image

System Information

Details [Docker image ](https://hub.docker.com/_/wordpress) WordPress 6.2.2 Apache 2/2.4.54 (Debian) PHP 8.1.16 Development environment Database mysqli Version 10.6.12-MariaDB-1:10.6.12+maria~ubu2004 Client version mysqlnd 8.1.16 Charset utf8mb4 ## Acceptance Criteria - [ ] The actions give_fields_ only run once. - [ ] The actions give_fields_ only run inside the form.
JoshuaHungDinh commented 1 year ago

Hi @emanuellopess, thank you for reporting this detailed issue. We appreciate your effort in bringing it to our attention.

Our team has been working diligently, preparing for a major release of exciting new features for Give. Once our current tasks are finalized, we'll prioritize this issue for a fix. While I can't provide an exact timeline at the moment, we will keep you informed about any progress or updates regarding the matter.

If you have any other questions or need further assistance, feel free to reach out.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.

emanuellopess commented 1 year ago

@JoshuaHungDinh Just so the issue is not closed, is this gonna be worked on GiveWP version 3.0.0? Should we find a workaround or the legacy action hooks will be there still on GiveWP 3.0.0 launch?

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.

github-actions[bot] commented 10 months ago

This issue was closed because it has been stalled for an additional 14 days with no activity.