Open milosreccode opened 3 months ago
PHP version: 8.1.13 Magento version: 2.4.6 Klaviyo extension version: 4.1.4
If customer is not already identified, it will be identified now by using email that customer entered in the email field.
Custoomer is not identified because window.klaviyo.isIdentified() returns promise, but it is used as boolean in if statement.
It seems that changing
if (!window.klaviyo.isIdentified()) { window.klaviyo.push(['identify', { '$email': self._email }]); }
to
window.klaviyo.isIdentified().then((isIdentified) => { if (!isIdentified) { window.klaviyo.push(['identify', { '$email': self._email }]); } });
is solution for this problem.
Environment details
PHP version: 8.1.13 Magento version: 2.4.6 Klaviyo extension version: 4.1.4
Steps to reproduce
Expected result
If customer is not already identified, it will be identified now by using email that customer entered in the email field.
Actual result
Custoomer is not identified because window.klaviyo.isIdentified() returns promise, but it is used as boolean in if statement.
Additional information
It seems that changing
to
is solution for this problem.