{"id":11,"date":"2026-04-26T19:57:16","date_gmt":"2026-04-26T16:27:16","guid":{"rendered":"https:\/\/renoxel.ir\/?page_id=11"},"modified":"2026-05-10T17:24:13","modified_gmt":"2026-05-10T13:54:13","slug":"my-account","status":"publish","type":"page","link":"https:\/\/renoxel.ir\/?page_id=11","title":{"rendered":"My account"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"11\" class=\"elementor elementor-11\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-3397e4fa e-con-full e-flex e-con e-parent\" data-id=\"3397e4fa\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5f170766 elementor-widget elementor-widget-text-editor\" data-id=\"5f170766\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<div class=\"woocommerce\">\n<div class=\"woocommerce-notices-wrapper\"><\/div>\n<div class=\"wetheme-otp-inline\">\n<div id=\"wetheme-otp-modal\" class=\"wetheme-modal\" style=\"display: none;\">\n<div class=\"wetheme-modal-overlay\"><\/div>\n<div class=\"wetheme-modal-content\">\n<div class=\"wetheme-modal-header\">\n            <img src=\"https:\/\/renoxel.ir\/wp-content\/themes\/We-Theme\/assets\/img\/logo\/white-logo.webp\" alt=\"\u0631\u0646\u0648\u06a9\u0633\u0644 - \u062f\u0631\u0645\u0648\u06a9\u0627\u0632\u0645\u062a\u06cc\u06a9\u0633\" class=\"wetheme-modal-logo\" loading=\"lazy\" decoding=\"async\">\n        <\/div>\n<div class=\"wetheme-modal-body\">\n<div id=\"wetheme-step-mobile\" class=\"wetheme-step\">\n<form id=\"wetheme-mobile-form\">\n<div class=\"wetheme-section-title\">\u0648\u0631\u0648\u062f \/ \u0639\u0636\u0648\u06cc\u062a<\/div>\n<div class=\"wetheme-form-group\">\n                        <label for=\"wetheme-mobile\">\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06cc\u0644<\/label><br \/>\n                        <input type=\"tel\" id=\"wetheme-mobile\" name=\"mobile\" placeholder=\"09123456789\" required><\/p>\n<div class=\"wetheme-error-message\" id=\"wetheme-mobile-error\"><\/div>\n<\/p><\/div>\n<div class=\"wetheme-form-actions\">\n                        <button type=\"submit\" class=\"wetheme-btn wetheme-btn-primary\"><br \/>\n                            <span class=\"wetheme-btn-text\">\u0627\u0631\u0633\u0627\u0644 \u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f<\/span><br \/>\n                            <span class=\"wetheme-btn-loading\" style=\"display: none;\">\u062f\u0631 \u062d\u0627\u0644 \u0627\u0631\u0633\u0627\u0644&#8230;<\/span><br \/>\n                        <\/button>\n                    <\/div>\n<\/p><\/form>\n<\/p><\/div>\n<div id=\"wetheme-step-email\" class=\"wetheme-step\" style=\"display: none;\">\n<form id=\"wetheme-email-form\">\n<div class=\"wetheme-section-title\">\u0648\u0631\u0648\u062f \/ \u0639\u0636\u0648\u06cc\u062a<\/div>\n<div class=\"wetheme-form-group\">\n                        <label for=\"wetheme-email\">\u0627\u06cc\u0645\u06cc\u0644<\/label><br \/>\n                        <input type=\"email\" id=\"wetheme-email\" name=\"email\" placeholder=\"name@example.com\" required><\/p>\n<div class=\"wetheme-error-message\" id=\"wetheme-email-error\"><\/div>\n<\/p><\/div>\n<div class=\"wetheme-form-actions\">\n                        <button type=\"submit\" class=\"wetheme-btn wetheme-btn-primary\"><br \/>\n                            <span class=\"wetheme-btn-text\">\u0627\u0631\u0633\u0627\u0644 \u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f<\/span><br \/>\n                            <span class=\"wetheme-btn-loading\" style=\"display: none;\">\u062f\u0631 \u062d\u0627\u0644 \u0627\u0631\u0633\u0627\u0644&#8230;<\/span><br \/>\n                        <\/button>\n                    <\/div>\n<\/p><\/form>\n<\/p><\/div>\n<div id=\"wetheme-step-profile\" class=\"wetheme-step\" style=\"display: none;\">\n<form id=\"wetheme-profile-form\">\n<div class=\"wetheme-form-row\">\n<div class=\"wetheme-form-name\" style=\"flex:1;\">\n                            <input type=\"text\" id=\"wetheme-firstname\" name=\"first_name\" placeholder=\"\u0646\u0627\u0645\" required><\/p>\n<div class=\"wetheme-error-message\" id=\"wetheme-firstname-error\"><\/div>\n<\/p><\/div>\n<div class=\"wetheme-form-name\" style=\"flex:1;\">\n                            <input type=\"text\" id=\"wetheme-lastname\" name=\"last_name\" placeholder=\"\u0646\u0627\u0645 \u062e\u0627\u0646\u0648\u0627\u062f\u06af\u06cc\" required><\/p>\n<div class=\"wetheme-error-message\" id=\"wetheme-lastname-error\"><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"wetheme-form-actions\">\n                        <button type=\"submit\" class=\"wetheme-btn wetheme-btn-primary\"><br \/>\n                            <span class=\"wetheme-btn-text\">\u0627\u0631\u0633\u0627\u0644 \u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f<\/span><br \/>\n                            <span class=\"wetheme-btn-loading\" style=\"display: none;\">\u062f\u0631 \u062d\u0627\u0644 \u0627\u0631\u0633\u0627\u0644&#8230;<\/span><br \/>\n                        <\/button>\n                    <\/div>\n<\/p><\/form>\n<\/p><\/div>\n<div id=\"wetheme-step-otp\" class=\"wetheme-step\" style=\"display: none;\">\n<form id=\"wetheme-otp-form\">\n<div class=\"wetheme-form-group\">\n                        <label for=\"wetheme-otp\">\u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f<\/label><br \/>\n                        <input type=\"text\" id=\"wetheme-otp\" name=\"otp\" placeholder=\"1234\" maxlength=\"6\" required><\/p>\n<div class=\"wetheme-error-message\" id=\"wetheme-otp-error\"><\/div>\n<\/p><\/div>\n<div class=\"wetheme-form-actions\">\n                        <button type=\"submit\" class=\"wetheme-btn wetheme-btn-primary\"><br \/>\n                            <span class=\"wetheme-btn-text\">\u062a\u0627\u06cc\u06cc\u062f \u06a9\u062f<\/span><br \/>\n                            <span class=\"wetheme-btn-loading\" style=\"display: none;\">\u062f\u0631 \u062d\u0627\u0644 \u062a\u0627\u06cc\u06cc\u062f&#8230;<\/span><br \/>\n                        <\/button><br \/>\n                        <button type=\"button\" id=\"wetheme-resend-otp\" class=\"wetheme-btn wetheme-btn-secondary\"><br \/>\n                            \u0627\u0631\u0633\u0627\u0644 \u0645\u062c\u062f\u062f \u06a9\u062f<br \/>\n                        <\/button>\n                    <\/div>\n<\/p><\/form>\n<\/p><\/div>\n<div id=\"wetheme-step-email-otp\" class=\"wetheme-step\" style=\"display: none;\">\n<form id=\"wetheme-email-otp-form\">\n<div class=\"wetheme-form-group\">\n                        <label for=\"wetheme-email-otp\">\u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f<\/label><br \/>\n                        <input type=\"text\" id=\"wetheme-email-otp\" name=\"otp\" placeholder=\"123456\" maxlength=\"6\" required><\/p>\n<div class=\"wetheme-error-message\" id=\"wetheme-email-otp-error\"><\/div>\n<\/p><\/div>\n<div class=\"wetheme-form-actions\">\n                        <button type=\"submit\" class=\"wetheme-btn wetheme-btn-primary\"><br \/>\n                            <span class=\"wetheme-btn-text\">\u062a\u0627\u06cc\u06cc\u062f \u06a9\u062f<\/span><br \/>\n                            <span class=\"wetheme-btn-loading\" style=\"display: none;\">\u062f\u0631 \u062d\u0627\u0644 \u062a\u0627\u06cc\u06cc\u062f&#8230;<\/span><br \/>\n                        <\/button><br \/>\n                        <button type=\"button\" id=\"wetheme-resend-email-otp\" class=\"wetheme-btn wetheme-btn-secondary\"><br \/>\n                            \u0627\u0631\u0633\u0627\u0644 \u0645\u062c\u062f\u062f \u06a9\u062f<br \/>\n                        <\/button>\n                    <\/div>\n<\/p><\/form>\n<\/p><\/div>\n<div id=\"wetheme-step-username\" class=\"wetheme-step\" style=\"display: none;\">\n<form id=\"wetheme-username-form\">\n<div class=\"wetheme-form-group\">\n                        <label for=\"wetheme-username\">\u0646\u0627\u0645 \u06a9\u0627\u0631\u0628\u0631\u06cc<\/label><br \/>\n                        <input type=\"text\" id=\"wetheme-username\" name=\"username\" placeholder=\"username\" required><\/p>\n<div class=\"wetheme-error-message\" id=\"wetheme-username-error\"><\/div>\n<\/p><\/div>\n<div class=\"wetheme-form-actions\">\n                        <button type=\"submit\" class=\"wetheme-btn wetheme-btn-primary\"><br \/>\n                            <span class=\"wetheme-btn-text\">\u062a\u06a9\u0645\u06cc\u0644 \u062b\u0628\u062a\u200c\u0646\u0627\u0645<\/span><br \/>\n                            <span class=\"wetheme-btn-loading\" style=\"display: none;\">\u062f\u0631 \u062d\u0627\u0644 \u0627\u0631\u0633\u0627\u0644&#8230;<\/span><br \/>\n                        <\/button>\n                    <\/div>\n<\/p><\/form>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"wetheme-modal-footer\">\n<p class=\"wetheme-terms\">\n                \u0628\u0627 \u0648\u0631\u0648\u062f \u0648 \u06cc\u0627 \u062b\u0628\u062a \u0646\u0627\u0645 \u062f\u0631 \u0633\u0627\u06cc\u062a \u0634\u0645\u0627<br \/>\n                <a href=\"#\" target=\"_blank\">\u0634\u0631\u0627\u06cc\u0637 \u0648 \u0642\u0648\u0627\u0646\u06cc\u0646<\/a><br \/>\n                \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632\u0633\u0627\u06cc\u062a \u0631\u0627 \u0645\u06cc\u067e\u0630\u06cc\u0631\u06cc\u062f.\n            <\/p>\n<\/p><\/div>\n<\/p><\/div>\n<\/div>\n<p><script>\njQuery(document).ready(function($) {\n    const loginFormType = 'sms_form'; \/\/ sms_form | normal_form<\/p>\n<p>    let currentMobile = '';\n    let currentEmail = '';\n    let resendTimer = null;\n    let resendCountdown = 60;\n    let isNewUserFlow = false;\n    let isNewEmailUserFlow = false;<\/p>\n<p>    \/\/ Open modal\n    function openOTPModal() {\n        $('#wetheme-otp-modal').fadeIn(300);\n    }<\/p>\n<p>    \/\/ Close modal\n    function closeOTPModal() {\n        $('#wetheme-otp-modal').fadeOut(300);\n        resetForm();\n    }<\/p>\n<p>    \/\/ Reset form\n    function resetForm() {\n        $('#wetheme-step-mobile, #wetheme-step-email, #wetheme-step-profile, #wetheme-step-otp, #wetheme-step-email-otp, #wetheme-step-username').hide();\n        $('#wetheme-firstname, #wetheme-lastname, #wetheme-mobile, #wetheme-otp, #wetheme-email, #wetheme-email-otp, #wetheme-username').val('');\n        isNewUserFlow = false;\n        isNewEmailUserFlow = false;\n        clearErrors();\n        clearResendTimer();<\/p>\n<p>        if (loginFormType === 'normal_form') {\n            $('#wetheme-step-email').show();\n        } else {\n            $('#wetheme-step-mobile').show();\n        }\n    }<\/p>\n<p>    \/\/ Clear errors\n    function clearErrors() {\n        $('.wetheme-error-message').hide();\n        $('.wetheme-form-group input').removeClass('error');\n    }<\/p>\n<p>    \/\/ Show error\n    function showError(field, message) {\n        $('#' + field + '-error').text(message).show();\n        $('#' + field).addClass('error');\n    }<\/p>\n<p>    \/\/ Clear resend timer\n    function clearResendTimer() {\n        if (resendTimer) {\n            clearInterval(resendTimer);\n            resendTimer = null;\n        }\n        resendCountdown = 60;\n        $('#wetheme-resend-otp').text('\u0627\u0631\u0633\u0627\u0644 \u0645\u062c\u062f\u062f \u06a9\u062f').prop('disabled', false);\n    }<\/p>\n<p>    \/\/ Start resend timer\n    function startResendTimer() {\n        resendCountdown = 60;\n        $('#wetheme-resend-otp').prop('disabled', true);<\/p>\n<p>        resendTimer = setInterval(function() {\n            resendCountdown--;\n            $('#wetheme-resend-otp').text('\u0627\u0631\u0633\u0627\u0644 \u0645\u062c\u062f\u062f \u06a9\u062f (' + resendCountdown + ')');<\/p>\n<p>            if (resendCountdown <= 0) {\n                clearResendTimer();\n            }\n        }, 1000);\n    }\n    \n    \/\/ Mobile form submit\n    $('#wetheme-mobile-form').on('submit', function(e) {\n        e.preventDefault();\n        \n        const mobile = $('#wetheme-mobile').val().trim();\n        if (!mobile) {\n            showError('wetheme-mobile', '\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06cc\u0644 \u0627\u0644\u0632\u0627\u0645\u06cc \u0627\u0633\u062a');\n            return;\n        }\n        \n        if (!\/^09\\d{9}$\/.test(mobile)) {\n            showError('wetheme-mobile', '\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06cc\u0644 \u0645\u0639\u062a\u0628\u0631 \u0646\u06cc\u0633\u062a');\n            return;\n        }\n        \n        clearErrors();\n        currentMobile = mobile;\n        \n        \/\/ Show loading\n        const $btn = $(this).find('button[type=\"submit\"]');\n        $btn.prop('disabled', true);\n        $btn.find('.wetheme-btn-text').hide();\n        $btn.find('.wetheme-btn-loading').show();\n        \n        \/\/ Debug\n        console.log('WeTheme OTP: Sending request with nonce:', wetheme_ajax.nonce);\n        \n        \/\/ Ask backend to handle: if user exists \u2192 send OTP; if new \u2192 return flag\n        $.ajax({\n            url: wetheme_ajax.ajax_url,\n            type: 'POST',\n            data: {\n                action: 'wetheme_send_otp',\n                mobile: mobile,\n                nonce: wetheme_ajax.nonce\n            },\n            success: function(response) {\n                if (response.success) {\n                    const needsRegistration = !!(response.data &#038;&#038; (response.data.register_required === true || response.data.user_exists === false));\n                    if (needsRegistration) {\n                        isNewUserFlow = true;\n                        $('#wetheme-step-mobile').hide();\n                        $('#wetheme-step-profile').show();\n                    } else {\n                        $('#wetheme-step-mobile').hide();\n                        $('#wetheme-step-otp').show();\n                        startResendTimer();\n                    }\n                } else {\n                    showError('wetheme-mobile', response.data || '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u0633\u0627\u0644 \u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f');\n                }\n            },\n            error: function() {\n                showError('wetheme-mobile', '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627 \u0633\u0631\u0648\u0631');\n            },\n            complete: function() {\n                $btn.prop('disabled', false);\n                $btn.find('.wetheme-btn-text').show();\n                $btn.find('.wetheme-btn-loading').hide();\n            }\n        });\n    });\n    \n    \/\/ OTP form submit (mobile)\n    $('#wetheme-otp-form').on('submit', function(e) {\n        e.preventDefault();\n        \n        const otp = $('#wetheme-otp').val().trim();\n        if (!otp) {\n            showError('wetheme-otp', '\u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f \u0627\u0644\u0632\u0627\u0645\u06cc \u0627\u0633\u062a');\n            return;\n        }\n        \n        clearErrors();\n        \n        \/\/ Show loading\n        const $btn = $(this).find('button[type=\"submit\"]');\n        $btn.prop('disabled', true);\n        $btn.find('.wetheme-btn-text').hide();\n        $btn.find('.wetheme-btn-loading').show();\n        \n        \/\/ Verify OTP\n        $.ajax({\n            url: wetheme_ajax.ajax_url,\n            type: 'POST',\n            data: {\n                action: 'wetheme_verify_otp',\n                mobile: currentMobile,\n                otp: otp,\n                nonce: wetheme_ajax.nonce\n            },\n            success: function(response) {\n                if (response.success) {\n                    \/\/ Stay on the current page: close modal and reload to reflect login state\n                    closeOTPModal();\n                    location.reload();\n                } else {\n                    showError('wetheme-otp', response.data || '\u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f \u0627\u0634\u062a\u0628\u0627\u0647 \u0627\u0633\u062a');\n                }\n            },\n            error: function() {\n                showError('wetheme-otp', '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627 \u0633\u0631\u0648\u0631');\n            },\n            complete: function() {\n                $btn.prop('disabled', false);\n                $btn.find('.wetheme-btn-text').show();\n                $btn.find('.wetheme-btn-loading').hide();\n            }\n        });\n    });\n\n    $('#wetheme-profile-form').on('submit', function(e) {\n        e.preventDefault();\n        \n        const firstName = $('#wetheme-firstname').val().trim();\n        const lastName = $('#wetheme-lastname').val().trim();\n        if (!firstName) {\n            showError('wetheme-firstname', '\u0646\u0627\u0645 \u0627\u0644\u0632\u0627\u0645\u06cc \u0627\u0633\u062a');\n            return;\n        }\n        if (!lastName) {\n            showError('wetheme-lastname', '\u0646\u0627\u0645 \u062e\u0627\u0646\u0648\u0627\u062f\u06af\u06cc \u0627\u0644\u0632\u0627\u0645\u06cc \u0627\u0633\u062a');\n            return;\n        }\n        clearErrors();\n        \n        const $btn = $(this).find('button[type=\"submit\"]');\n        $btn.prop('disabled', true);\n        $btn.find('.wetheme-btn-text').hide();\n        $btn.find('.wetheme-btn-loading').show();\n        \n        $.ajax({\n            url: wetheme_ajax.ajax_url,\n            type: 'POST',\n            data: {\n                action: 'wetheme_send_otp',\n                mobile: currentMobile,\n                first_name: firstName,\n                last_name: lastName,\n                nonce: wetheme_ajax.nonce\n            },\n            success: function(response) {\n                if (response.success) {\n                    $('#wetheme-step-profile').hide();\n                    $('#wetheme-step-otp').show();\n                    startResendTimer();\n                } else {\n                    showError('wetheme-fullname', response.data || '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u0633\u0627\u0644 \u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f');\n                }\n            },\n            error: function() {\n                showError('wetheme-fullname', '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627 \u0633\u0631\u0648\u0631');\n            },\n            complete: function() {\n                $btn.prop('disabled', false);\n                $btn.find('.wetheme-btn-text').show();\n                $btn.find('.wetheme-btn-loading').hide();\n            }\n        });\n    });\n    \n    \/\/ Resend OTP (mobile)\n    $('#wetheme-resend-otp').on('click', function() {\n        if ($(this).prop('disabled')) return;\n        \n        clearErrors();\n        \n        \/\/ Show loading\n        $(this).prop('disabled', true).text('\u062f\u0631 \u062d\u0627\u0644 \u0627\u0631\u0633\u0627\u0644...');\n        \n        \/\/ Send OTP request\n        $.ajax({\n            url: wetheme_ajax.ajax_url,\n            type: 'POST',\n            data: {\n                action: 'wetheme_send_otp',\n                mobile: currentMobile,\n                nonce: wetheme_ajax.nonce\n            },\n            success: function(response) {\n                if (response.success) {\n                    startResendTimer();\n                } else {\n                    showError('wetheme-otp', response.data || '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u0633\u0627\u0644 \u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f');\n                }\n            },\n            error: function() {\n                showError('wetheme-otp', '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627 \u0633\u0631\u0648\u0631');\n            },\n            complete: function() {\n                $('#wetheme-resend-otp').prop('disabled', false);\n            }\n        });\n    });\n    \n    \/\/ Close modal events\n    $('.wetheme-modal-close, .wetheme-modal-overlay').on('click', closeOTPModal);\n    \n    \/\/ Prevent modal close on content click\n    $('.wetheme-modal-content').on('click', function(e) {\n        e.stopPropagation();\n    });\n    \n    \/\/ ESC key to close\n    $(document).on('keydown', function(e) {\n        if (e.keyCode === 27 &#038;&#038; $('#wetheme-otp-modal').is(':visible')) {\n            closeOTPModal();\n        }\n    });\n    \n    \/\/ Global function to open modal\n    window.openWeThemeOTPModal = openOTPModal;\n\n    \/\/ ---------- Email flow ----------\n    function startEmailResendTimer() {\n        resendCountdown = 60;\n        $('#wetheme-resend-email-otp').prop('disabled', true);\n        \n        resendTimer = setInterval(function() {\n            resendCountdown--;\n            $('#wetheme-resend-email-otp').text('\u0627\u0631\u0633\u0627\u0644 \u0645\u062c\u062f\u062f \u06a9\u062f (' + resendCountdown + ')');\n            \n            if (resendCountdown <= 0) {\n                clearResendTimer();\n            }\n        }, 1000);\n    }\n\n    $('#wetheme-email-form').on('submit', function(e) {\n        e.preventDefault();\n\n        const email = $('#wetheme-email').val().trim();\n        if (!email) {\n            showError('wetheme-email', '\u0627\u06cc\u0645\u06cc\u0644 \u0627\u0644\u0632\u0627\u0645\u06cc \u0627\u0633\u062a');\n            return;\n        }\n        if (!\/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/.test(email)) {\n            showError('wetheme-email', '\u0627\u06cc\u0645\u06cc\u0644 \u0645\u0639\u062a\u0628\u0631 \u0646\u06cc\u0633\u062a');\n            return;\n        }\n\n        clearErrors();\n        currentEmail = email;\n\n        const $btn = $(this).find('button[type=\"submit\"]');\n        $btn.prop('disabled', true);\n        $btn.find('.wetheme-btn-text').hide();\n        $btn.find('.wetheme-btn-loading').show();\n\n        $.ajax({\n            url: wetheme_ajax.ajax_url,\n            type: 'POST',\n            data: {\n                action: 'wetheme_send_email_otp',\n                email: email,\n                nonce: wetheme_ajax.nonce\n            },\n            success: function(response) {\n                if (response.success) {\n                    const needsRegistration = !!(response.data &#038;&#038; (response.data.register_required === true || response.data.user_exists === false));\n                    isNewEmailUserFlow = needsRegistration;\n                    $('#wetheme-step-email').hide();\n                    $('#wetheme-step-email-otp').show();\n                    startEmailResendTimer();\n                } else {\n                    showError('wetheme-email', response.data || '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u0633\u0627\u0644 \u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f');\n                }\n            },\n            error: function() {\n                showError('wetheme-email', '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627 \u0633\u0631\u0648\u0631');\n            },\n            complete: function() {\n                $btn.prop('disabled', false);\n                $btn.find('.wetheme-btn-text').show();\n                $btn.find('.wetheme-btn-loading').hide();\n            }\n        });\n    });\n\n    $('#wetheme-email-otp-form').on('submit', function(e) {\n        e.preventDefault();\n\n        const otp = $('#wetheme-email-otp').val().trim();\n        if (!otp) {\n            showError('wetheme-email-otp', '\u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f \u0627\u0644\u0632\u0627\u0645\u06cc \u0627\u0633\u062a');\n            return;\n        }\n\n        clearErrors();\n\n        const $btn = $(this).find('button[type=\"submit\"]');\n        $btn.prop('disabled', true);\n        $btn.find('.wetheme-btn-text').hide();\n        $btn.find('.wetheme-btn-loading').show();\n\n        $.ajax({\n            url: wetheme_ajax.ajax_url,\n            type: 'POST',\n            data: {\n                action: 'wetheme_verify_email_otp',\n                email: currentEmail,\n                otp: otp,\n                nonce: wetheme_ajax.nonce\n            },\n            success: function(response) {\n                if (response.success) {\n                    const isNew = !!(response.data &#038;&#038; (response.data.register_required === true || response.data.user_exists === false));\n                    if (isNew) {\n                        $('#wetheme-step-email-otp').hide();\n                        $('#wetheme-step-username').show();\n                    } else {\n                        closeOTPModal();\n                        location.reload();\n                    }\n                } else {\n                    showError('wetheme-email-otp', response.data || '\u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f \u0627\u0634\u062a\u0628\u0627\u0647 \u0627\u0633\u062a');\n                }\n            },\n            error: function() {\n                showError('wetheme-email-otp', '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627 \u0633\u0631\u0648\u0631');\n            },\n            complete: function() {\n                $btn.prop('disabled', false);\n                $btn.find('.wetheme-btn-text').show();\n                $btn.find('.wetheme-btn-loading').hide();\n            }\n        });\n    });\n\n    $('#wetheme-username-form').on('submit', function(e) {\n        e.preventDefault();\n\n        const username = $('#wetheme-username').val().trim();\n        if (!username) {\n            showError('wetheme-username', '\u0646\u0627\u0645 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0627\u0644\u0632\u0627\u0645\u06cc \u0627\u0633\u062a');\n            return;\n        }\n\n        clearErrors();\n\n        const $btn = $(this).find('button[type=\"submit\"]');\n        $btn.prop('disabled', true);\n        $btn.find('.wetheme-btn-text').hide();\n        $btn.find('.wetheme-btn-loading').show();\n\n        $.ajax({\n            url: wetheme_ajax.ajax_url,\n            type: 'POST',\n            data: {\n                action: 'wetheme_complete_email_registration',\n                email: currentEmail,\n                username: username,\n                nonce: wetheme_ajax.nonce\n            },\n            success: function(response) {\n                if (response.success) {\n                    closeOTPModal();\n                    location.reload();\n                } else {\n                    showError('wetheme-username', response.data || '\u062e\u0637\u0627 \u062f\u0631 \u062a\u06a9\u0645\u06cc\u0644 \u062b\u0628\u062a\u200c\u0646\u0627\u0645');\n                }\n            },\n            error: function() {\n                showError('wetheme-username', '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627 \u0633\u0631\u0648\u0631');\n            },\n            complete: function() {\n                $btn.prop('disabled', false);\n                $btn.find('.wetheme-btn-text').show();\n                $btn.find('.wetheme-btn-loading').hide();\n            }\n        });\n    });\n\n    $('#wetheme-resend-email-otp').on('click', function() {\n        if ($(this).prop('disabled')) return;\n\n        clearErrors();\n        $(this).prop('disabled', true).text('\u062f\u0631 \u062d\u0627\u0644 \u0627\u0631\u0633\u0627\u0644...');\n\n        $.ajax({\n            url: wetheme_ajax.ajax_url,\n            type: 'POST',\n            data: {\n                action: 'wetheme_send_email_otp',\n                email: currentEmail,\n                nonce: wetheme_ajax.nonce\n            },\n            success: function(response) {\n                if (response.success) {\n                    startEmailResendTimer();\n                } else {\n                    showError('wetheme-email-otp', response.data || '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u0633\u0627\u0644 \u06a9\u062f \u062a\u0627\u06cc\u06cc\u062f');\n                }\n            },\n            error: function() {\n                showError('wetheme-email-otp', '\u062e\u0637\u0627 \u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627 \u0633\u0631\u0648\u0631');\n            },\n            complete: function() {\n                $('#wetheme-resend-email-otp').prop('disabled', false);\n            }\n        });\n    });\n\n    \/\/ Initialize correct entry form\n    resetForm();\n});\n<\/script><br \/>\n        <script>\n        jQuery(function($){\n            $('#wetheme-otp-modal').show();\n            $('body').removeClass('wetheme-modal-open');\n        });\n        <\/script>\n<\/div>\n<\/div>\n\n<p class=\"wp-block-paragraph\">\u00a0<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u00a0<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-11","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/renoxel.ir\/index.php?rest_route=\/wp\/v2\/pages\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/renoxel.ir\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/renoxel.ir\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/renoxel.ir\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/renoxel.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11"}],"version-history":[{"count":11,"href":"https:\/\/renoxel.ir\/index.php?rest_route=\/wp\/v2\/pages\/11\/revisions"}],"predecessor-version":[{"id":266,"href":"https:\/\/renoxel.ir\/index.php?rest_route=\/wp\/v2\/pages\/11\/revisions\/266"}],"wp:attachment":[{"href":"https:\/\/renoxel.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}