Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter nerdykronos

    (@nerdykronos)

    I don’t know if the following is what you were asking for:

    CREATE TABLE wp_email_log (
    id mediumint(9) NOT NULL AUTO_INCREMENT,
    to_email varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    subject varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL,
    message text COLLATE utf8mb4_unicode_ci NOT NULL,
    headers text COLLATE utf8mb4_unicode_ci NOT NULL,
    attachments text COLLATE utf8mb4_unicode_ci NOT NULL,
    sent_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (id)
    ) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

    • This reply was modified 8 years, 9 months ago by nerdykronos.
    Thread Starter nerdykronos

    (@nerdykronos)

    Well the following are database versions on my local machine:
    > Server type: MariaDB
    > Server version: 10.1.22-MariaDB – Source distribution

    > Database client version: libmysql – mysqlnd 5.0.12-dev

    Below are the versions on my webhost:
    > Server type: MariaDB
    > Server version: 10.0.25-MariaDB – MariaDB Server

    > Database client version: libmysql – 5.1.73

    Please let me know if you wish to know something else.
    Thanks 🙂

    Thread Starter nerdykronos

    (@nerdykronos)

    @johnbillion

    Thanks for the reply.
    Unfortunately, the P3 plugin has been discontinued.I’ll try to use the Hooks section and see if I can make some sense out of it(hopefully in a staging environment).
    Btw thanks for this amazing plugin and looking forward to future updates.
    🙂

    random

    Thread Starter nerdykronos

    (@nerdykronos)

    I know that we shouldn’t EDIT SOURCE CODE but, I just don’t know of any other way to do it.
    It would be really helpful if you can give me a suggestion or a solution to do it.
    Thanks

    I finally figured out a solution to this problem.Just do the following steps and see if this solves it for you guys too:

    1. Go to yourtheme/woocommerce/myaccount/ (“yourtheme” here means that theme that you are currently using)
    2. Create a new file and name it as “form-login.php”
    3. Add the below code in that file and save it.
    <?php
    /**
     * Login Form
     *
     * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.php.
     *
     * HOWEVER, on occasion WooCommerce will need to update template files and you
     * (the theme developer) will need to copy the new files to your theme to
     * maintain compatibility. We try to do this as little as possible, but it does
     * happen. When this occurs the version of the template file will be bumped and
     * the readme will list any important changes.
     *
     * @see     https://docs.woocommerce.com/document/template-structure/
     * @author  WooThemes
     * @package WooCommerce/Templates
     * @version 2.6.0
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
        exit; // Exit if accessed directly
    }
    
    ?>
    
    <?php wc_print_notices(); ?>
    
    <?php do_action( 'woocommerce_before_customer_login_form' ); ?>
    
    <?php    if( isset( $_GET['action']) && $_GET['action'] == "register"): ?> 
        <!--REGISTRATION BLOCK -->    
        <div>
            <h2><?php _e( 'Register', 'woocommerce' ); ?></h2>
    
            <form method="post" class="register">
    
                <?php do_action( 'woocommerce_register_form_start' ); ?>
    
                <?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
    
                    <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
                        <label for="reg_username"><?php _e( 'Username', 'woocommerce' ); ?> <span class="required">*</span></label>
                        <input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
                    </p>
    
                <?php endif; ?>
    
                <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
                    <label for="reg_email"><?php _e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label>
                    <input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( $_POST['email'] ) : ''; ?>" />
                </p>
    
                <?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
    
                    <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
                        <label for="reg_password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
                        <input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" />
                    </p>
    
                <?php endif; ?>
    
                <!-- Spam Trap -->
                <div style="<?php echo ( ( is_rtl() ) ? 'right' : 'left' ); ?>: -999em; position: absolute;"><label for="trap"><?php _e( 'Anti-spam', 'woocommerce' ); ?></label><input type="text" name="email_2" id="trap" tabindex="-1" autocomplete="off" /></div>
    
                <?php do_action( 'woocommerce_register_form' ); ?>
    
                <p class="woocomerce-FormRow form-row">
                    <?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
                    <input type="submit" class="woocommerce-Button button" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>" />
                </p>
    
                <?php do_action( 'woocommerce_register_form_end' ); ?>
    
            </form>
    
        </div>
        <!--REGISTRATION BLOCK END-->
    
    <?php  else: ?> 
        <!--LOGIN BLOCK START -->
        <p>Don't have an account?&ensp;<a href="?action=register">Register</a></p>
        <div>
            <h2><?php _e( 'Login', 'woocommerce' ); ?></h2>
    
            <form class="woocomerce-form woocommerce-form-login login" method="post">
    
                <?php do_action( 'woocommerce_login_form_start' ); ?>
    
                <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
                    <label for="username"><?php _e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
                    <input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
                </p>
                <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
                    <label for="password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
                    <input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" />
                </p>
    
                <?php do_action( 'woocommerce_login_form' ); ?>
    
                <p class="form-row">
                    <?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
                    <input type="submit" class="woocommerce-Button button" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>" />
                    <label class="woocommerce-form__label woocommerce-form__label-for-checkbox inline">
                        <input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php _e( 'Remember me', 'woocommerce' ); ?></span>
                    </label>
                </p>
                <p class="woocommerce-LostPassword lost_password">
                    <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?', 'woocommerce' ); ?></a>
                </p>
    
                <?php do_action( 'woocommerce_login_form_end' ); ?>
    
            </form>
        </div>
        <!--LOGIN BLOCK END-->
    
    <?php endif; ?>
      
    <?php do_action( 'woocommerce_after_customer_login_form' ); ?>

    Note:

    • This file will override your default “My Account” page and I have disabled the option Enable customer registration on the “My account” page in WooCommerce “Accounts” settings.
    • To get back to your default “My Account” page, just delete the above file.

    Helpful links:

    Thread Starter nerdykronos

    (@nerdykronos)

    Thank you so much… 🙂

    Thread Starter nerdykronos

    (@nerdykronos)

    Thank you. I followed the correct usage and it works. Thanks again.

    Thread Starter nerdykronos

    (@nerdykronos)

    Okay..my bad

    So if anyone has this issue do the following:
    1) open wp-content/plugins/woocommerce/includes/data-stores/
    2) open the file class-wc-customer-data-store-session.php
    3) add the green highlighted lines in place of the red highlighted line in the
    above file as show here

    For more info on above : more info

    • This reply was modified 8 years, 11 months ago by nerdykronos. Reason: found solution
    • This reply was modified 8 years, 11 months ago by nerdykronos. Reason: made helpful changes
Viewing 9 replies - 1 through 9 (of 9 total)