Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not unsubscribe email from Admin #302

Open
nghiadxvn opened this issue May 28, 2024 · 0 comments
Open

Could not unsubscribe email from Admin #302

nghiadxvn opened this issue May 28, 2024 · 0 comments
Labels
internal-bug-created Progress: Ready Issue is in an upcoming sprint

Comments

@nghiadxvn
Copy link

Environment details

PHP version: 8.1
Magento version: 2.4.5-p7
Klaviyo extension version: 4.1.3
Magento site has multiple websites, each site has separate Klaviyo settings. The A site has a different configuration with the default settings.

Steps to reproduce

  1. Could not unsubscribe from Marketing -> Communications -> Newsletter Subscribers
  • Login to the backend, go to Marketing -> Communications -> Newsletter Subscribers
  • Unsubscribe a customer from A site in the grid
  • Check result
  1. Could not unsubscribe from the customer edit page in the Admin
  • Login to the backend, go to Customers -> All Customers -> Edit a customer
  • Unsubscribe a customer from A site in the Newsletter tab
  • Check result

Expected result

The customer should be unsubscribed from the Klaviyo

Actual result

The customer is still subscribed to the Klaviyo

Additional information

  • Please check this file klaviyo/magento2-extension/Helper/Data.php - the unsubscribeEmailFromKlaviyoList function
  • The $listId value was given incorrectly
  • Check file klaviyo/magento2-extension/Helper/ScopeSetting.php - the getScopeSetting function
  • The $storeId is checked incorrectly. It must be obtained based on the customer's store instead of these codes
    $scopedStoreCode = $this->_request->getParam('store');
    $scopedWebsiteCode = $this->_request->getParam('website');
  • So, I think we need to change the unsubscribeEmailFromKlaviyoList and pass in $storeId param
  • We can use $storeId = $customer->getStoreId() or $subscriber->getStoreId() based on a customer is guest or not
@cykolln cykolln added the Progress: Ready Issue is in an upcoming sprint label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal-bug-created Progress: Ready Issue is in an upcoming sprint
Projects
None yet
Development

No branches or pull requests

2 participants