If a log already exists for a specific variant ID with an email address (e.g., myemail@site.com), any attempt to register interest again using the exact same email address fails validation, as expected.
However, if the same email address is entered with different letter casing (e.g., myEmail@Site.com), it is saved as a new record. This behavior can result in duplicate notifications being sent when the variant returns to stock.
Steps to reproduce
Register interest for a product using an email.
Attempt to register interest for a product but change the letter case for some characters in the email address.
Interest is logged rather than returning validation error.
Ah, looks like a Postgres-specific issue. Fixed for the next release. To get this early, run composer require verbb/back-in-stock:"dev-craft-4 as 3.0.3".
Describe the bug
If a log already exists for a specific variant ID with an email address (e.g., myemail@site.com), any attempt to register interest again using the exact same email address fails validation, as expected.
However, if the same email address is entered with different letter casing (e.g., myEmail@Site.com), it is saved as a new record. This behavior can result in duplicate notifications being sent when the variant returns to stock.
Steps to reproduce
Craft CMS version
4.13.2
Plugin version
3.0.3
Multi-site?
Yes
Additional context
DB driver is PostgreSQL 14