gravity-pdf
gravity-pdf copied to clipboard
Add Payment Status and Payment Amount Conditional Logic options
Description
This PR registers two new choices in the conditional logic selector:
- Payment Status
- Payment Amount
I've opted not to include additional entry meta like Entry ID, or Entry Date, at this stage as it requires additional work to support. This PR just focuses on the most important meta data.
TODO:
- [ ] Check if conditional logic will pass as is, or if we need to hook into Gravity Forms and make some tweaks when the logic is being parsed
- [ ] Write E2E test
Partially resolves #1404
Testing instructions
Screenshots
Checklist:
- [ ] I've tested the code.
- [ ] My code is easy to read, follow, and understand
- [ ] My code follows the accessibility standards.
- [ ] My code has proper inline documentation / docblocks.
Additional Comments
Codecov Report
Merging #1405 (7aa5aed) into development (493b8d5) will increase coverage by
0.98%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## development #1405 +/- ##
=================================================
+ Coverage 77.34% 78.32% +0.98%
- Complexity 2900 2902 +2
=================================================
Files 243 243
Lines 10107 10133 +26
Branches 370 370
=================================================
+ Hits 7817 7937 +120
+ Misses 2282 2188 -94
Partials 8 8
Impacted Files | Coverage Δ | |
---|---|---|
src/Model/Model_Form_Settings.php | 92.92% <100.00%> (+0.33%) |
:arrow_up: |
src/View/html/PDF/core_template_styles.php | 98.00% <0.00%> (ø) |
|
src/View/View_PDF.php | 79.87% <0.00%> (+0.12%) |
:arrow_up: |
src/Helper/Fields/Field_Repeater.php | 97.80% <0.00%> (+0.15%) |
:arrow_up: |
src/Helper/Fields/Field_Address.php | 86.00% <0.00%> (+2.00%) |
:arrow_up: |
src/Helper/Fields/Field_Quiz.php | 91.66% <0.00%> (+2.77%) |
:arrow_up: |
src/Helper/Helper_Field_Container_Gf25.php | 90.00% <0.00%> (+6.00%) |
:arrow_up: |
src/Helper/Fields/Field_Shipping.php | 92.30% <0.00%> (+26.92%) |
:arrow_up: |
src/Helper/Fields/Field_Quantity.php | 100.00% <0.00%> (+28.57%) |
:arrow_up: |
src/Helper/Fields/Field_Total.php | 91.30% <0.00%> (+30.43%) |
:arrow_up: |
... and 3 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@jestonihpi looks like Gravity Wiz strikes again! They have done something similar with their snippets: https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-conditional-logic-entry-meta.php#L165-L179. Note: there's currently no license included with this snippet, so use it as a reference for how you hook into Gravity Forms to add custom conditional logic.
@jakejackson1 . Woot! noted.
@jestonisumande pair your work down to just Payment Status and Payment Amount for now.
Copy @jakejackson1 .