Migrated plugin to new API