
# Changelog

## 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!
