(Advanced) What changed from 1.x to 2.0?
Note: This article is for developers.
Hooks into a different GravityView filter
We had been filtering entries using the (deprecated)
gravityview_search_criteria filter. Now we are using the
gravityview/view/query filter, which allows us to manipulate a
GF_Query object instead of a simple array.
Rewrote the UI in Svelte
In Version 1, we were using the Gravity Forms UI that is used on Gravity Forms' Entries pages. To allow for more advanced functionality, we developed our own "query builder".
- Navigate to
[path to plugin]/assets/js/src
- Install dependencies by running
- Compile assets by running
npm run build
Migrated to new schema
Advanced Filters stores its settings in a post meta named _gravityview_filters.
Building more complex logic required a change to the schema used to store filters. The structure of the data has changed in Version 2.
Views using the old schema will have their settings converted only when that View is updated. Until a View is updated, settings will be dynamically converted from the old schema to the new one. See the
GravityView_Advanced_Filtering::convert_filters_to_nested() method to see how the migration works.