(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".
The new UI was written using Svelte and requires compilation. Make sure that you have Node.js and Yarn installed, and then:
- Navigate to
[path to plugin]/assets/js/src
- Install dependencies by running
yarn install
- Compile assets by running
npm run build
Migrated to the new schema
Advanced Filters stores its settings in a post meta named _gravityview_filters.
Building more complex logic required changing 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.