WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Add custom data to user meta at registration (2 posts)

  1. bsaltd
    Member
    Posted 1 year ago #

    I have added a field to the user registration form using the register_form hook, and I want to add this to the user meta when the registration form is submitted, can anyone help me on how to do this?

    Thanks

    http://wordpress.org/extend/plugins/woocommerce/

  2. bheadrick
    Member
    Posted 1 year ago #

    looks like you might be able to add checkout fields using a filter:

    add_filter('woocommerce_checkout_fields', 'custom_checkout_fields');
    
    function custom_checkout_fields($fields){
    			$fields['account']['custom-field'] = array(
    				'type' 			=> 'text',
    				'label' 		=> __( 'Custom Field', 'woocommerce' ),
    				'placeholder' 	=> _x( 'custom', 'placeholder', 'woocommerce' )
    			);
    
    return $fields;
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.