GravityPDF / gravity-pdf

Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using Gravity Forms.
https://gravitypdf.com
88 stars 21 forks source link

Add Payment Status and Payment Amount Conditional Logic options #1405

Closed jakejackson1 closed 1 year ago

jakejackson1 commented 1 year ago

Description

This PR registers two new choices in the conditional logic selector:

  1. Payment Status
  2. 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:

Partially resolves #1404

Testing instructions

Screenshots

Checklist:

Additional Comments

codecov[bot] commented 1 year ago

Codecov Report

Merging #1405 (7aa5aed) into development (493b8d5) will increase coverage by 0.98%. The diff coverage is 100.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.

jakejackson1 commented 1 year ago

@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.

jestonihpi commented 1 year ago

@jakejackson1 . Woot! noted.

jakejackson1 commented 1 year ago

@jestonisumande pair your work down to just Payment Status and Payment Amount for now.

jestonihpi commented 1 year ago

Copy @jakejackson1 .