
# Changelog

## 1.5.17 | April 10, 2025

- Added runtime caching when checking if entries are flagged for spam.

## 1.5.16 | January 10, 2025

- Fixed regression where GP Unique ID would prevent Post Content Merge Tags `gppcmt_pretty_id` entry meta from saving correctly.

## 1.5.15 | January 7, 2025

- Fixed an issue where generated Unique IDs could get set to an empty value with certain setups.
- Fixed PHP 8 warning.

## 1.5.14 | October 9, 2024

- Fixed merge tag selector not being in the appropriate position for the Prefix and Suffix field settings.

## 1.5.13 | September 11, 2024

- Updated prefix and suffix field settings tooltips.

## 1.5.12 | August 27, 2024

- Fixed issue where using a `0` as the prefix or suffix in Unique ID fields was not functioning correctly.

## 1.5.11 | July 9, 2024

- Fixed PHP error when updating entries when using the Gravity Forms REST API.

## 1.5.10 | June 20, 2024

- Fixed issue where conditionally hidden Unique ID field failed to generate delayed payment notifications.

## 1.5.9 | May 22, 2024

- Fixed issue where Unique ID field values were regenerated after payment was completed.
- Fixed issue where Unique ID field values were regenerated for entry revisions created by GravityRevisions.

## 1.5.8 | May 15, 2024

- Improved compatibility with Gravity Flow and GravityView Importer.

## 1.5.7

- Fixed an issue where unique ID was not present in "Payment Completed" notifications when "Wait for Payment" was enabled.
- Fixed issue where wait-for-payment unique ID generation failed if honeypot was enabled.

## 1.5.6

- Fixed minor security issue.

## 1.5.5

- Fixed an issue with unique id not generating for delayed payment.

## 1.5.4

- Fixed an issue with filter to delay unique ID generation was not working with Stripe Payment Gateways.

## 1.5.3

- Fixed an issue with Prefix and Suffix on Unique IDs.

## 1.5.2

- Fixed an issue where a WooCommerce Form could get same unique ID for different entries.

## 1.5.1

- Fixed an issue where Sequential Unique IDs could increment by more than 1 for some forms.

## 1.5

- Updated to only trigger database update when the plugin version changes.
- Added support for a new `slug` column in the `gpui_sequence` table to better support creating custom sequences.

## 1.4.15

- Fixed issue where checking if entry was spammed outside of a typical Gravity Forms submission flow would incorrectly set a property that should only be set during a typical GF submission flow.

## 1.4.14

- Added support for Unique ID field to be editable with GravityView Inline Edit.

## 1.4.13

- Added support for fast-forwarding sequence when a Unique ID is manually updated.

## 1.4.12

- Updated filter `gpui_unique_id_attributes` to include entry value.
- Fixed an issue where Unique ID was regenerated for an unspammed/untrashed entry, which already had a Unique ID stored.

## 1.4.11

- Fixed potential PHP 8 warnings.

## 1.4.10

- Fixed an issue with duplicate unique ID generated for a previous edited entry.

## 1.4.9

- Added new functionality which skips generating unique IDs for spammed entries. If an entry is unspammed, it will have a unique ID generated.

## 1.4.8

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

## 1.4.7

- Updated database schema to resolve issues with daily sequential IDs.

## 1.4.6

- Improved compatibility with Gravity Flow Form Connector add-on.

## 1.4.5

- Fixed issue where sequential IDs would not work as expected when using the Shared Sequential ID snippet with prefixes/suffixes.
- Added "Update URI" to plugin header to improve security.

## 1.4.4

- Fixed issue where sequential IDs were limited to `4294967295`. They can now go up to `18446744073709551615` (MySQL BIGINT maximum).

## 1.4.3

- Fixed issue where minimum requirements were being bypassed due to a dependency conflict.

## 1.4.2

- Fixed a potential SQL issue during DB setup/upgrade.

## 1.4.1

- Updated perk SQL table unique key to primary.

## 1.4

- Improved support for Gravity Forms 2.5.

## 1.3.23

- Added support for Gravity Forms Mollie plugin.

## 1.3.22

- Fixed an issue where starting number was not parsed correctly on reset.

## 1.3.21

- Fixed a potential issue where resetting starting sequential number may fail.

## 1.3.20

- Added inline hook documentation for [gpui_numeric_minimum_length](https://gravitywiz.com/documentation/gpui_numeric_minimum_length/). Additionally, the "Length" setting's tooltip now uses the filtered value.
- Added inline hook documentation for [gpui_sequential_unique_id_pre_insert](https://gravitywiz.com/documentation/gpui_sequential_unique_id_pre_insert/).
- Updated conditional logic drop down in the GP Unique ID field settings to read Enable or Disable instead of Show or Hide.

## 1.3.19

- Added logging when unique ID is generated and saved to field.

## 1.3.18

- Fixed conflict with GravityView where editing an entry with no fields configured would overwrite the value of Unique ID fields.

## 1.3.17

- Fixed fatal error that could occur when Gravity Perks was activated but Gravity Forms was not.

## 1.3.16

- Fixed issue where field settings were reset due to incorrect values in GP_Plugin variables.

## 1.3.15

- Updated perk to use GP_Plugin framework.
- Updated plugin author.

## 1.3.14

- Updated no longer process unique IDs for partial entries.

## 1.3.13

- Added "gpui_form_editor_field_settings" filter to allow filtering the field settings that appear in the Form Editor for Unique ID fields.

## 1.3.12

- Added support for generating unique IDs when entries are added via the API.

## 1.3.11

- Fixed issue where using merge tag inserter for Prefix and Suffix settings did not correctly save the inserted merge tag.

## 1.3.10

- Updated core minimum length for numeric unique IDs to 6 (down from 9).
- Added 'gpui_numeric_minimum_length' filter for setting the minimum length for numeric unique IDs.

## 1.3.9

- Updated unique ID generation to respect the filtered length even if it is below our recommended minimum length.

## 1.3.7

- Fixed backwards-compat issue with GF versions below 2.1 where Unique ID field label was visible on frontend.

## 1.3.6

- Fixed backwards compatability issues with GF versions below 2.2.

## 1.3.5

    - Fixed notice generated when upgrading versions caused by use of deprecated Gravity Forms function.
    - Updated GP_Boostrap to version 1.2.

## 1.3.3

    - Updated Perk to be compatible with future versions of Gravity Forms.

## 1.3.2

    - Updated unique ID generation to happen on gform_entry_post_save priority 8 so that it will still be generated *before* GF feeds are processed but also give other plugins an oppurtunity (priority 9) to interact with unique ID before GF feeds as processed as well.

## 1.3.1

    - Added new filter for specifing a custom wait-for-payment feed; 'gpui_wait_for_payment_feed'.

## 1.3

    - Added support for merge tags in Prefix and Suffix settings.
    - Added support for waiting until PayPal Standard payment has been received (via gpui_wait_for_payment filter).
    - Updated field class to use the GF_Field class for better integration with Gravity Forms.

## 1.2.8

    - Added support for Unique ID fields in Notification routing
    - Minor refactoring

## 1.2.7

    - Updated perk to use GP_Bootstrap

## 1.2.6

    - Updated to support checking for posted value before generated new unique id

## 1.2.5

    - Updated priority of unique ID generation to occur before add-on framework processed feeds

## 1.2.4

    - Added inline documentation for the 'gpui_unique_id_attributes' filter

## 1.2.3

    - Added "gpui_input_html_options" filter for modifying input HTML; allows displaying input on frontend
        Example: https://gist.github.com/spivurno/aa5ffa48cb30728e0dd5
    - Added wrapper HTML to mimic default GF fields for cases where Unique ID field is actually displayed
    - Fixed typo in "Unique ID Suffix" tooltip

## 1.2.2

    - Added "gpui_sequential_unique_id_pre_insert" filter for custom handling of sequential IDs.
        Example: https://gist.github.com/spivurno/9a918859d7e5af2e7a92

## 1.2.1

    - Updated to avoid issue where unique IDs were overwritten when editing entry via Gravity View

## 1.2

    - Added better localization support

## 1.1.4

    - Added bootstrap support; fixes plugin order loading issue on Multisite installs

## 1.1.3

    - Fixed issue where default value was overwritten for unique ID field

## 1.1.2

    - Fixed issue where gpui_sequence table was not created due to missing $wpdb variable

## 1.1.1 

    - Added support for setting $form_id and $field_id in 'gpui_unique_id_attributes' filter; this allows sharing unique ID indexes across multiple forms

## 1.1

    - Added support for conditional logic on Unique ID field
    - Updated GP_Unique_ID::field_obj to be public to better support custom modifications

## 1.0

    - Added support for resetting the starting number via the field settings

## 1.0.beta3.0

    - Added support for sequential unique IDs
    - Added support for uninstalling
    - Added starting number, length, prefix and suffix options (with UI)
    - Added UI for specifying the "type" of unique ID to be generated
    - Removed Unique ID merge tag support

## 1.0.beta2.1

    - Added filter 'gpui_unique_id' to support modifying the generated unique ID
        add_filter( 'gpui_unique_id', 'my_unique_id_modifier', 10, 3 );
        function my_unique_id_attributes( $unique_id, $form_id, $field_id ) {
            return strtoupper( $unqiue );
        }

## 1.0.beta2.0

    - Added filter 'gpui_unique_id_attributes' to support modifying the attributes used to generate the unique ID
        add_filter( 'gpui_unique_id_attributes', 'my_unique_id_attributes' );
        function my_unique_id_attributes( $atts ) {
            $atts['length'] = 12;
            $atts['type'] = 'numeric';
            return $atts;
        }
    - Added support for "numeric" UID type (not available in UI yet)
    - Add filter 'gpui_check_unique_query' to support modifing the query which ensures that the unique ID generated is unique
        add_filter( 'gpui_check_unique_query', 'my_check_unique_query' );
        function my_check_unique_query( $query ) {
            $query['where'] = 'some change';
            return $query;
        }
    - Fixed notice when "defaultValue" property not set on $field object

## 1.0.beta1.1

    - Updated documentation link to use the correct URL
    - Added changelog

## 1.0.beta1

    - And so it begins...