$hash, 'status' => 'issued', 'ip_address' => Helper::getIp(), 'use_type' => 'signup_verification', 'used_count' => 0, 'two_fa_code_hash' => wp_hash_password($verifcationCode), 'valid_till' => gmdate('Y-m-d H:i:s', current_time('timestamp') + 10 * 60), 'created_at' => current_time('mysql'), 'updated_at' => current_time('mysql') ); Meta::insert([ 'object_type' => 'fs_login_hashes', 'key' => $hash, 'value' => maybe_serialize($data) ]); // translators: %s is the site name $mailSubject = apply_filters("fluent_support/signup_verification_mail_subject", sprintf(__('Your registration verification code for %s', 'fluent-support'), get_bloginfo('name'))); $pStart = '

'; // translators: %s is the user's first name $message = $pStart . sprintf(__('Hello %s,', 'fluent-support'), Arr::get($formData, 'first_name')) . '

' . $pStart . __('Thank you for registering with us! To complete the setup of your account, please enter the verification code below on the registration page.', 'fluent-support') . '

' . // translators: %s is the verification code $pStart . '' . sprintf(__('Verification Code: %s', 'fluent-support'), $verifcationCode) . '

' . '
' . $pStart . __('This code is valid for 10 minutes and is meant to ensure the security of your account. If you did not initiate this request, please ignore this email.', 'fluent-support') . '

'; $message = apply_filters('fluent_support/signup_verification_email_body', $message, $verifcationCode, $formData); $data = [ 'body' => $message, 'pre_header' => __('Activate your account', 'fluent-support'), 'show_footer' => false ]; $message = Helper::loadView('notification', $data); $headers = array('Content-Type: text/html; charset=UTF-8'); \wp_mail($formData['email'], $mailSubject, $message, $headers); ob_start(); ?>