Add default value for opt-in position to Populator

[MAILPOET-5807]
This commit is contained in:
 Ján Mikláš
2024-07-31 13:13:42 +02:00
committed by Aschepikov
parent 13e45a960f
commit e640fa10cb

View File

@ -306,6 +306,7 @@ class Populator {
$this->settings->set('woocommerce.optin_on_checkout', [
'enabled' => empty($settingsDbVersion), // enable on new installs only
'message' => $currentLabelText,
'position' => Hooks::DEFAULT_OPTIN_POSITION,
]);
} elseif (isset($woocommerceOptinOnCheckout['message']) && $woocommerceOptinOnCheckout['message'] === $legacyLabelText) {
$this->settings->set('woocommerce.optin_on_checkout.message', $currentLabelText);