
# Changelog

## 1.2.35 | September 10, 2025

- Fixed a potential conflict with tax computation and flat coupons.

## 1.2.34 | June 10, 2025

- Fixed JS error.

## 1.2.33 | June 4, 2025

- Fixed issue with minified JavaScript which affected frontend calculations of coupon codes in some cases.

## 1.2.32 | May 14, 2025

- Removed redundant check for Gravity Perks in preparation for Spellbook.

## 1.2.31 | April 17, 2025

- Fixed an issue where custom decimal precision defined via the `gform_currencies` PHP filter was not being applied correctly in certain scenarios.

## 1.2.30 | November 27, 2024

- Fixed compatibility issue with Gravity Forms 2.9 where conditional logic changes would not update the total if using fields like the Tax field.

## 1.2.29 | October 23, 2024

- Improved compatibility with GF 2.9.

## 1.2.28

- Improved how Tax field values are rounded.

## 1.2.27

- Fixed issue where frontend tax calculations did not match backend tax calculations under certain conditions.

## 1.2.26

- Fixed styling issue when dispaying {order_summary} markup on the frontend.
- Improved support for the {order_summary} and Theme Framework; font sizes will now be honored.
- Removed HTML escaping from product field labels to match core Gravity Forms behavior.

## 1.2.25

- Updated remaining references to `String.prototype.format()` to use `String.prototype.gformFormat()` as the former is removed in Gravity Forms 2.8.

## 1.2.24

- Fixed potential PHP error when using WP-CLI.

## 1.2.23

- Fixed issue with some submissions being marked as fraudulent by Stripe due to tax calculations being rounded with a precision of `2` rather than `3`.
- Fixed an issue where the subtotal could calculate incorrectly when using decimal comma currencies (such as Euro) and using decimal comma formatting with quantities.
- Fixed a potential fatal error if using the `:value` modifier with the `{order_summary}` merge tag.

## 1.2.22

- Fixed regression with Tax and Discount calculations after submission.

## 1.2.21

- Added support for excluding shipping from Tax fields via the [gpecf_include_shipping_in_tax](https://gravitywiz.com/documentation/gpecf_include_shipping_in_tax/) filter.

## 1.2.20

- Fixed PHP 8 warnings.

## 1.2.19

- Updated references to `String.prototype.format()` to use `String.prototype.gformFormat()` as the former will be removed in Gravity Forms 2.8.

## 1.2.18

- Added new `gpecf_field_total` filter hook (PHP & JS) to allow modifying the calculation of the field total.

## 1.2.17

- Fixed issue where JavaScript errors could be thrown on reload of AJAX-enabled forms and cause miscalculations.

## 1.2.16

- Fixed an issue with GF Coupon computing incorrect total value.

## 1.2.15

- Fixed potential JavaScript error on form render that could cause issues with conditional logic in some situations.

## 1.2.14

- Added German translations. Credit: Florian Rinnhofer of sportunion.at

## 1.2.13

- Fixed issue with conditional logic not always working on initial load if the conditional logic was dependent on formula fields containing eCommerce Fields merge tags such as `{subtotal}`.

## 1.2.12

- Fixed issue where editing Calculated products on the Entry Details screen using the `gw-edit-product-and-payment-details.php` snippet along with GP eCommerce Fields would result in the product quantity being removed.

## 1.2.11

- Fixed regression with Discount fields not working when using Gravity Forms PayPal Checkout 2.4 and newer.

## 1.2.10

- Fixed an issue where flat, product-specific discounts were not capped by the total of the product fields to which they applied.
- Fixed compatibility issue with Discount fields not working with Gravity Forms PayPal Checkout 2.4 and newer.

## 1.2.9

- Removed unneeded filter on `gform_ppcp_discount_total` for the PayPal Checkout add-on if using PayPal Checkout 2.2.1 or newer.

## 1.2.8

- Fixed issue where get calculations were not updated when navigating to previous pages.
- Added "Update URI" to plugin header to improve security.

## 1.2.7

- Fixed issue where GP eCommerce Fields would not always exclude shipping from discounts/coupons when viewing the form.

## 1.2.6

- Fixed JavaScript error when using GP eCommerce Fields with Gravity Forms 2.5.14.1 or newer and the Coupons Add-On.

## 1.2.5

- Improved performance of formula calculations.

## 1.2.4

- Fixed a potential issue where GPECF may replace GPPA's LMTs before they are parsed, leaving their `@` in the output.

## 1.2.3

- Fixed a potential PHP warning if an entry wasn't available while reprocessing calculations.

## 1.2.2

- Improved performance on complex forms with a large amount of calculations and/or conditional logic.

## 1.2.1

- Improved compatibility with PayPal Checkout Add-on when using the Discount field.
- Improved support for Gravity Forms 2.5. (#21)
- Updated minimum required version of Gravity Perks to 2.2.3.
- Fixed issue where if a Product field ID and coupon code were the same (i.e. 50), GPECF would display the product as a coupon.
- Fixed possible order-of-events issue where GPECF would cause percentage-based discounts to be applied based on an already adjusted total.

## 1.2

- Improved support for Gravity Forms 2.5.

## 1.1

- Added full support for Gravity Forms 2.5!
- Improved field settings UI for GF 2.5.
- Updated minimum requirements to Gravity Perks 2.2.
- Fixed order-of-events issue which caused percentage based coupons to include themselves in the calculated discount in GF 2.5.
- Fixed issue where numeric coupon codes could be confused with products resulting in products being listed as coupons in the order summary in GF 2.5.

## 1.0.47

- Fixed potential scenario where GP eCommerce Fields could get stuck in an infinite loop when calculations and GP Conditional Pricing are used together.

## 1.0.46

- Fixed issue where WC GF Product Add-ons total was updated *before* eCommerce fields were included.

## 1.0.45

- Fixed issue where coupons from the Coupons Add-on would be re-added and cause incorrect calculations.

## 1.0.44

- Fixed a potential issue where GPECF may throw a runtime JS error.

## 1.0.43

- Fixed markup and styling of Order header in {all_fields} merge tag.

## 1.0.42

- Fixed an issue where GPECF may generate a PHP warning if product price is not numeric.
- Updated docblock for "gpecf_order_labels" filter to provide additional details.

## 1.0.41

- Fixed dependency on jQuery.migrate that has been removed as of WordPress 5.5.
- Fixed issue with Gravity Forms 2.5 where markup was being rendered in the field label.
- Added $modifiers as an 8th parameter to the [gpecf_order_sumary_markup](https://gravitywiz.com/documentation/gpecf_order_sumary_markup/) filter.
- Added acceptance tests. (#5)

## 1.0.40

- Fixed notices generated when updating an entry (via the GF entry update screen) with a calculation-enabled field containing a GPECF merge tag.

## 1.0.39

- Added support for showing formatted value when fetched via the GFAddon::get_value_entry_detail() method.

## 1.0.38

- Added [gpecf_order_sumary_markup](https://gravitywiz.com/documentation/gpecf_order_sumary_markup/) to allow modifying the order summary markup.

## 1.0.37

- Fixed invalid value when using the {discounts} merge tag in a Calculated Product field.

## 1.0.36

- Fixed issue where Tax fields that excluded products could result in unexpected values when product fields contained negative values.

## 1.0.35

- Fixed notices generated when no quantity was specified for a Calculated Product field.

## 1.0.34

- Added acceptance tests.
- Fixed recursion with Calculated Product field containing {subtotal} merge tag.
- Fixed issue where Calculated Product field containing {subtotal} merge tag could result in infinite recursion.

## 1.0.33

- Fixed performance issue on AJAX-enabled forms when many Calculated Products were present.

## 1.0.32

- Added compatibility fix for upcoming GF Coupons 2.9.3.

## 1.0.31

- Fixed fatal error that could occur when Gravity Perks was active but Gravity Forms was not.
- Updated to use GP_Plugin class.

## 1.0.30

- Fixed issue with versions of GF prior to 2.4.15 (which is unreleased at the time of this commit).
- Fixed issue where Calculated Number fields containing only GPECF merge tags (e.g. {subtotal}) were not recalculated when Calculated Product fields' prices changed.

## 1.0.29

- Fixed missing <tr> in order summary header which caused PDF generators to render the order summary correctly.

## 1.0.28

- Fixed issue where product-specific Tax fields failed to account for coupon discounts.

## 1.0.27

- Fixed issue where Discount fields which excluded specific products were not correctly exempted when calculating an excluded product's individual price.

## 1.0.26

- Fixed notice generated in PHP 7.3.

## 1.0.25

- Fixed issue where {discounts} merge tag was not correctly calculated when no Coupon field was present on the form.

## 1.0.24

- Fixed notice of missing "item_index" with GF 2.4.

## 1.0.23

- Added PHP and JS filter "gpecf_discount_total" to allow filtering the calculated discount for a Discount field.

## 1.0.22

- Fixed error with GF 2.4 where field objects now have a "fields" property.

## 1.0.21

- Added support for using choice values in order summary: {order_summary:value}.

## 1.0.20

- Fixed issue where product-specific discounts were incorrectly calculated when the product total was 0.

## 1.0.19

- Fixed issue where {subtotal} merge tag replacement was inaccurate when multiple Calculation Product fields contained a {subtotal} merge tag.

## 1.0.18

- Fixed order-of-events issue where calculations containing the {coupons} were recalculated prematurely.

## 1.0.17

- Added support for style/script minimization.
- Fixed bug where field values were not fetched correctly when reevaluating calculations (w/ GF 2.3).

## 1.0.16.6

- Fixed JS error where multiple forms were on the page and only one implemented GF calculations.

## 1.0.16.5

- Fixed JS error where multiple forms were on a page and current form contained an eCommerce merge tag but no coupon field.

## 1.0.16.4

- Fixed issue where incorrect parameter type would cause fatal error on negative total fix.

## 1.0.16.3

- Fixed issue where Gravity Forms allows negative totals.

## 1.0.16.2

- Fixed issue where flat, product-specific discounts would discount more than the applicable products' total.

## 1.0.16.1

- Fixed issue where flat discounts were not correctly calculated for product-specific tax fields.

## 1.0.16

- Fixed infinite loop conflict with GP Conditional Pricing (requires latest version of Gravity Forms as well).

## 1.0.15

- Added 'gpecf_order_summary' filter to allow filtering the $order_summary before it is rendered.

## 1.0.14

- Added support for showing subtotal if custom-added tax/discount line items exist in order summary.

## 1.0.13

- Added support for showing custom-added tax/discount line items in the order summary.

## 1.0.12

- Fixed issue where calculation-enabled fields were recalculated even when hidden via conditional logic.

## 1.0.11

- Fixed a JS issue where fields hidden via conditional logic would always trigger a change event creating an infinite loop.
- Fixed issue where change event was triggered for fields when values were the same but of different types (e.g. "40" != 40).
- Fixed issue where in some browsers, when previously entered values were saved, refreshing the page would result in a mismatch between the displayed value and the input value.

## 1.0.9

- Updated field-specific merge tags to automatically display as currency (100 => $100.00).

## 1.0.8

- Updated issue where product-specific taxes were calculated incorrectly when no discount applied. Bug introduced by 1.0.7.

## 1.0.7

- Fixed issue where product-specific taxes did not correctly deduct product-specific discounts.

## 1.0.6

- Fixed issue where including multiple GPEC merge tags in a formula would result in 0; this was caused only the first instance of the GPEC merge tag being replaced.

## 1.0.5

- Fixed issue where conditional logic dependent on a Calculation-enabled field that contained an ecommerce merge tag did not evaluate correctly.

## 1.0.4

- Added translation support.

## 1.0.3

- Updated GP_Ecommerce_Fields::get_order() to use choice text by default.

## 1.0.2

- Fixed issue with WC GF Product Add-ons where reprocessed calculations were always blank.

## 1.0.1

- Fixed issue with GP Conditional Pricing were Calculation fields that contained an ecommerce merge tag were not always updated when product's price changed.

## 1.0

- Ready for production use.
- Added support for registering eCommerce field types as product field types.
- Fixed issue where reprocessing calculations would add a new row for the updated value instead of updating the existing values.
- Updated GP_Bootstrap to v1.2.

## 1.0.beta1.7

- Fixed issue where non-US money formats were not correctly rendered on the frontend fields.

## 1.0.beta1.6

- Added gpecf_order_labels filter for readily modifying labels used in order summary.

## 1.0.beta1.5

    - Fixed issue where eCommerce field values were not capped at two decimals which caused miscellaneous conflicts.

## 1.0.beta1.4

    - Fixed issue where Calculated Products were not captured by GF payment add-ons.

## 1.0.beta1.3

    - Updated integration with WC GF Product Add-ons to now show eCommerce fields in cart description.

## 1.0.beta1.2

    - Fixed documentation URL (previously resulted in 404).

## 1.0.beta1.1

    - Fixed fatal error when gf_coupons() was not available.

## 1.0.beta1.0

- Fixed issue where percentage amounts could exceed 100.
- Fixed issue where unconfigured Tax & Discount fields would break form rendering.
- Updated GF min required version.

## 1.0.alpha1.4

- Updated Discounts to be deducted before coupons are applied.
- Updated GP_Ecommerce_Fields::has_coupon() to check $entry if no coupon found in $order.

## 1.0.alpha1.3

    - Added support for saving value to entry for Subtotal, Discount & Tax; allows entries to be filtered/sorted by these values on Entry List.
    - Fixed issue where percentage amounts were not correctly formatted after saving form in Form Editor.
    - Fixed issue where {subtotal} value was not formatted as currency when used outside of a calculation formula.

## 1.0.alpha1.2

    - Fixed issue where {order_summary} merge tag was not replaced.

## 1.0.alpha1.1

- Fixed issue where Subtotal field did not correctly filter products.

## 1.0.alpha1.0

    - Ready for testing!
