Set guest user by default to unsubscribed

The status will be updated when the user opts in for marketing email on checkout

MAILPOET-5963
This commit is contained in:
Oluwaseun Olorunsola
2024-04-24 17:07:25 +01:00
committed by Aschepikov
parent 3c8f354039
commit e6c31ee737

View File

@ -167,7 +167,7 @@ class WooCommerce {
if (!$wcOrder instanceof \WC_Order) return;
$signupConfirmation = $this->settings->get('signup_confirmation');
$status = SubscriberEntity::STATUS_UNCONFIRMED;
$status = SubscriberEntity::STATUS_UNSUBSCRIBED;
if ((bool)$signupConfirmation['enabled'] === false) {
$status = SubscriberEntity::STATUS_SUBSCRIBED;
}