Forum Replies Created

Viewing 15 replies - 16 through 30 (of 36 total)
  • Shilpa

    (@kshilpa1385)

    Hi,

    I have same problem….

    Thread Starter Shilpa

    (@kshilpa1385)

    Hi,

    Any updated regarding duplicate of newsletter!!!

    Thread Starter Shilpa

    (@kshilpa1385)

    Hi Ryann,

    I am waiting for your reply.

    Thanks

    Thread Starter Shilpa

    (@kshilpa1385)

    Thanks @davmerit

    Thread Starter Shilpa

    (@kshilpa1385)

    Thanks…

    I am waiting for your reply..

    Shilpa

    (@kshilpa1385)

    hi all,

    I want to hide only “Showing all jobs”, “RSS feed”

    Which code should I used for this?

    I try above code but not working for me.

    Thanks

    Thread Starter Shilpa

    (@kshilpa1385)

    hi Elvis,

    No not yet!

    Because WordPress converts password in another form.

    Shilpa

    (@kshilpa1385)

    hi,

    I also want these type of plugins which auto send unique coupon code each one through mail after user buy the product.

    Please any one know then share with us.

    Thanks…

    Thanks a lot Roy.

    Thanks Roy Ho…

    you means i used like:

    //Adding Registration fields to the form 
    
    add_action( 'register_form', 'adding_custom_registration_fields' );
    function adding_custom_registration_fields( ) {
    
    	//lets make the field required so that i can show you how to validate it later;
    	$firstname = empty( $_POST['firstname'] ) ? '' : $_POST['firstname'];
    	$lastname  = empty( $_POST['lastname'] ) ? '' : $_POST['lastname'];
    	$phone = empty( $_POST['phone'] ) ? '' : $_POST['phone'];
    	?>
    	<div class="form-row form-row-wide">
    		<label for="reg_firstname"><?php _e( 'First Name', 'woocommerce' ) ?><span class="required">*</span></label>
    		<input type="text" class="input-text" name="firstname" id="reg_firstname" size="30" value="<?php echo esc_attr( $firstname ) ?>" />
    	</div>
    	<div class="form-row form-row-wide">
    		<label for="reg_lastname"><?php _e( 'Last Name', 'woocommerce' ) ?><span class="required">*</span></label>
    		<input type="text" class="input-text" name="lastname" id="reg_lastname" size="30" value="<?php echo esc_attr( $lastname ) ?>" />
    	</div>
    	<div class="form-row form-row-wide">
    		<label for="reg_phone"><?php _e( 'Phone', 'woocommerce' ) ?><span class="required">*</span></label>
    		<input type="text" class="input-text" name="phone" id="reg_phone" size="10" value="<?php echo esc_attr( $phone ) ?>" />
    	</div><?php
    }
    
    //Validation registration form  after submission using the filter registration_errors
    add_filter( 'woocommerce_registration_errors', 'registration_errors_validation' );
    
    /**
     * @param WP_Error $reg_errors
     *
     * @return WP_Error
     */
    function registration_errors_validation( $reg_errors ) {
    
    	if ( empty( $_POST['firstname'] ) || empty( $_POST['lastname'] ) || empty( $_POST['phone']) ) {
    		$reg_errors->add( 'empty required fields', __( 'Please fill in the required fields.', 'woocommerce' ) );
    	}
    
    	return $reg_errors;
    }
    
    //Updating use meta after registration successful registration
    add_action('woocommerce_created_customer','adding_extra_reg_fields');
    
    function adding_extra_reg_fields($user_id) {
    	extract($_POST);
    	update_user_meta($user_id, 'first_name', sanitize_text_field( $firstname ));
    	update_user_meta($user_id, 'last_name', sanitize_text_field( $lastname ));
    	update_user_meta($user_id, 'phone', sanitize_text_field( $phone ));
    	update_user_meta($user_id, 'billing_first_name', sanitize_text_field( $firstname ));
    	update_user_meta($user_id, 'shipping_first_name', sanitize_text_field( $firstname ));
    	update_user_meta($user_id, 'billing_last_name', sanitize_text_field( $lastname ));
    	update_user_meta($user_id, 'shipping_last_name', sanitize_text_field( $lastname ));
    	update_user_meta($user_id, 'billing_phone', sanitize_text_field( $phone ));
    }

    Please tell me above syntax is correct or not?

    Thanks jennybeaumont…

    …searching lot for adding field to woocommerce registration form.
    finally got solution.
    It’s work for me and I add one more field in that form of mobile number:

    //Adding Registration fields to the form 
    
    add_action( 'register_form', 'adding_custom_registration_fields' );
    function adding_custom_registration_fields( ) {
    
    	//lets make the field required so that i can show you how to validate it later;
    	$firstname = empty( $_POST['firstname'] ) ? '' : $_POST['firstname'];
    	$lastname  = empty( $_POST['lastname'] ) ? '' : $_POST['lastname'];
    	$phone = empty( $_POST['phone'] ) ? '' : $_POST['phone'];
    	?>
    	<div class="form-row form-row-wide">
    		<label for="reg_firstname"><?php _e( 'First Name', 'woocommerce' ) ?><span class="required">*</span></label>
    		<input type="text" class="input-text" name="firstname" id="reg_firstname" size="30" value="<?php echo esc_attr( $firstname ) ?>" />
    	</div>
    	<div class="form-row form-row-wide">
    		<label for="reg_lastname"><?php _e( 'Last Name', 'woocommerce' ) ?><span class="required">*</span></label>
    		<input type="text" class="input-text" name="lastname" id="reg_lastname" size="30" value="<?php echo esc_attr( $lastname ) ?>" />
    	</div>
    	<div class="form-row form-row-wide">
    		<label for="reg_phone"><?php _e( 'Phone', 'woocommerce' ) ?><span class="required">*</span></label>
    		<input type="text" class="input-text" name="phone" id="reg_phone" size="10" value="<?php echo esc_attr( $phone ) ?>" />
    	</div><?php
    }
    
    //Validation registration form  after submission using the filter registration_errors
    add_filter( 'woocommerce_registration_errors', 'registration_errors_validation' );
    
    /**
     * @param WP_Error $reg_errors
     *
     * @return WP_Error
     */
    function registration_errors_validation( $reg_errors ) {
    
    	if ( empty( $_POST['firstname'] ) || empty( $_POST['lastname'] ) || empty( $_POST['phone']) ) {
    		$reg_errors->add( 'empty required fields', __( 'Please fill in the required fields.', 'woocommerce' ) );
    	}
    
    	return $reg_errors;
    }
    
    //Updating use meta after registration successful registration
    add_action('woocommerce_created_customer','adding_extra_reg_fields');
    
    function adding_extra_reg_fields($user_id) {
    	extract($_POST);
    	update_user_meta($user_id, 'first_name', $firstname);
    	update_user_meta($user_id, 'last_name', $lastname);
    	update_user_meta($user_id, 'phone', $phone);
    	update_user_meta($user_id, 'billing_first_name', $firstname);
    	update_user_meta($user_id, 'shipping_first_name', $firstname);
    	update_user_meta($user_id, 'billing_last_name', $lastname);
    	update_user_meta($user_id, 'shipping_last_name', $lastname);
    	update_user_meta($user_id, 'billing_phone', $phone);
    }

    and it works for me….

    I want to ask one more things how to show mobile number on user dashboard?

    Thread Starter Shilpa

    (@kshilpa1385)

    Yes, it has been solved:

    I removed latest version of wp-members 2.9.3 and install previous version like 2.9.1.

    Thread Starter Shilpa

    (@kshilpa1385)

    yes, I tried

    https://tools.pingdom.com/

    It shows 19.60s load time and size 7.4MB.

    Thread Starter Shilpa

    (@kshilpa1385)

    hi Mark,

    Please find my website link:

    https://wordpress.dheya.com/wordpress/

    right now it on subdomain.

    Hello Chad Butler

    I have same problem “User data not saved”
    I have wp-members 2.9.3 and wordpress 3.9.1

Viewing 15 replies - 16 through 30 (of 36 total)