Skip to content

Conversation

veryspry
Copy link
Contributor

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/2015154047/38861/

It is difficult to configure gpnf-override-parent-merge-tag-on-submission.php for multiple child forms. This enables users to more easily apply the logic to multiple child forms.

Summary

  • Refactors the snippet to a class to match our preferred snippet style.
  • Support instantiating one instance of GPNF_Override_Parent_Merge_Tags per child form a user wants to configure.
  • Support instantiating a single instance of GPNF_Override_Parent_Merge_Tags with no arguments to apply this to all child forms.

@veryspry veryspry requested review from claygriffiths, spivurno and saifsultanc and removed request for spivurno September 27, 2022 15:09
@veryspry
Copy link
Contributor Author

veryspry commented Sep 29, 2022

I added an additional config option called include_field_ids per a user request. In order to keep it simple, exclude_field_ids will be ignored if include_field_ids is used.

@spivurno Let me know what you think of this API change!

@spivurno
Copy link
Contributor

@veryspry Love it!

Copy link
Contributor

@claygriffiths claygriffiths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Just one small tweak for usage comments, otherwise LGTM

@veryspry veryspry changed the title Refactored gpnf-override-parent-merge-tag-on-submission.php into a class gpnf-override-parent-merge-tag-on-submission.php: refactor into a class and add make configuration for multiple child forms easier. Oct 3, 2022
@veryspry veryspry changed the title gpnf-override-parent-merge-tag-on-submission.php: refactor into a class and add make configuration for multiple child forms easier. gpnf-override-parent-merge-tag-on-submission: refactor into a class and add make configuration for multiple child forms easier. Oct 3, 2022
@veryspry veryspry force-pushed the matt/refactor-parent-merge-tag-override branch from 9b120e9 to e55ab63 Compare October 3, 2022 16:28
@veryspry veryspry changed the title gpnf-override-parent-merge-tag-on-submission: refactor into a class and add make configuration for multiple child forms easier. gpnf-override-parent-merge-tag-on-submission: Refactor into a class and add make configuration for multiple child forms easier. Oct 3, 2022
@veryspry
Copy link
Contributor Author

veryspry commented Oct 6, 2022

We are currently waiting for a user to confirm that it works for them. After that, I'll merge!

@veryspry veryspry changed the title gpnf-override-parent-merge-tag-on-submission: Refactor into a class and add make configuration for multiple child forms easier. Refactor gpnf-override-parent-merge-tag-on-submission into a class and make configuration for multiple child forms easier. Oct 6, 2022
@veryspry veryspry force-pushed the matt/refactor-parent-merge-tag-override branch from e55ab63 to d3c8df7 Compare October 6, 2022 17:43
@veryspry veryspry changed the title Refactor gpnf-override-parent-merge-tag-on-submission into a class and make configuration for multiple child forms easier. gpnf-override-parent-merge-tag-on-submission: Refactor into a class and make configuration for multiple child forms easier. Oct 10, 2022
@veryspry veryspry force-pushed the matt/refactor-parent-merge-tag-override branch 2 times, most recently from 8e24810 to 67fc5a6 Compare October 10, 2022 16:16
@veryspry veryspry changed the title gpnf-override-parent-merge-tag-on-submission: Refactor into a class and make configuration for multiple child forms easier. gpnf-override-parent-merge-tag-on-submission: Refactored into a class and made configuration for multiple child forms easier. Oct 10, 2022
…ss and made configuration for multiple child forms easier.
@veryspry veryspry force-pushed the matt/refactor-parent-merge-tag-override branch from 67fc5a6 to e6fe114 Compare October 10, 2022 16:17
@veryspry veryspry changed the title gpnf-override-parent-merge-tag-on-submission: Refactored into a class and made configuration for multiple child forms easier. gpnf-override-parent-merge-tag-on-submission: Updated to a class and made configuration for multiple child forms easier. Oct 10, 2022
@veryspry veryspry merged commit c7f08a7 into master Oct 10, 2022
@veryspry veryspry deleted the matt/refactor-parent-merge-tag-override branch October 10, 2022 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants