Supplero

You want click "create an account" to link my account page.

Please use the child theme then add the code below in the functions.php file of the child theme.

if (!function_exists('supplero_form_login')) {
    function supplero_form_login() {
        ?>
        <div class="login-form-head">
            <span class="login-form-title"><?php esc_attr_e('Sign in', 'supplero') ?></span>
            <span class="pull-right">
                <a class="register-link" href="<?php echo get_permalink(get_option('woocommerce_myaccount_page_id')); ?>"
                   title="<?php esc_attr_e('Register', 'supplero'); ?>"><?php esc_attr_e('Create an Account', 'supplero'); ?></a>
            </span>
        </div>
        <form class="supplero-login-form-ajax" data-toggle="validator">
            <p>
                <label><?php esc_attr_e('Username or email', 'supplero'); ?> <span class="required">*</span></label>
                <input name="username" type="text" required placeholder="<?php esc_attr_e('Username', 'supplero') ?>">
            </p>
            <p>
                <label><?php esc_attr_e('Password', 'supplero'); ?> <span class="required">*</span></label>
                <input name="password" type="password" required placeholder="<?php esc_attr_e('Password', 'supplero') ?>">
            </p>
            <button type="submit" data-button-action
                    class="btn btn-primary btn-block w-100 mt-1"><?php esc_html_e('Login', 'supplero') ?></button>
            <input type="hidden" name="action" value="supplero_login">
            <?php wp_nonce_field('ajax-supplero-login-nonce', 'security-login'); ?>
        </form>
        <div class="login-form-bottom">
            <a href="<?php echo wp_lostpassword_url(get_permalink()); ?>" class="lostpass-link"
               title="<?php esc_attr_e('Lost your password?', 'supplero'); ?>"><?php esc_attr_e('Lost your password?', 'supplero'); ?></a>
        </div>
        <?php
    }
}

Choose Page My Account, Go to WooCommerce > Settings > Advanced.

To add this form, you need to install the WooCommerce plugin and go to WooCommerce->Settings of your dashboard. Click on the Privacy and Accounts section and check the option to the Allow customers to create an account on the “My Account” page option.

Then check again the issue.

Last updated