getDoubleOptinEmailSentDate example

'country' => $address->getCountry() ? $address->getCountry()->getId() : null,
                'state' => $address->getState() ? $address->getState()->getId() : null,
            ]);
        }

        $storedData = [
            'customerId' => $customer->getId(),
            'register' => ['billing' => $mailContext], // This structure being required by \sAdmin::sSaveRegisterSendConfirmation             'fromCheckout' => $fromCheckout,
        ];

        $this->connection->executeQuery($sql[$customer->getDoubleOptinEmailSentDate()->format('Y-m-d H:i:s')$hashserialize($storedData)]);

        return (int) $this->connection->fetchColumn('SELECT id FROM `s_core_optin` WHERE `hash` = :hash', [':hash' => $hash]);
    }

    private function saveOptinIdToCustomer(int $optinId, Customer $customer): void
    {
        $customer->setRegisterOptInId($optinId);
        $this->modelManager->persist($customer);
        $this->modelManager->flush($customer);
    }
}
Home | Imprint | This part of the site doesn't use cookies.