In my other sandbox the class's version is 41 where it is not giving that issue.
So, need to upgrade the package version.
One recommendation to the package developer is NOT to use following Standard fields in SOQL WHERE clause otherwiseotherwise, target environment will not able to encrypt fields by Shield Platform Encryption.
Account
- Account Name
- Account Mailing Address
- Physical Address (Only Shipping Street and Shipping City are encrypted.)
- Phone
- Fax
- Website
- Description
- Account Site
Contact
- Name
- Other Address
- Mailing Address
- Phone
- Fax
- Mobile
- Home Phone
- Other Phone
- Asst. Phone
- Title
- Assistant
- Description
Lead
- Name
- Title
- Company
- Address
- Phone
- Mobile
- Fax
- Website
- Description
Opportunity
- Opportunity Name
- Description
- Next Step
Case
- Subject
- Description
Case Comment
- Body
Contract
- Billing Address