Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello i was looking for this too but since could not find anything decided to write something myself.
    Since i dont like (and would not recommend) editing woocommerce plugin files.
    I did everything through my themes functions.php file. Everything seems to be working well and all the proper hooks and filters are triggering.
    here we go:

    //Adding Registration fields to the form 
    
    add_filter( '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;
    	echo '<div class="form-row form-row-wide"><label for="reg_firstname">'.__('First Name', 'woocommerce').' <span class="required">*</span></label>
    <input type="text" class="input-text" name="firstname" id="reg_firstname" size="30" value="'.esc_attr($_POST['firstname']).'" /></div>';
    
    }
    
    //Validation registration form  after submission using the filter registration_errors
    add_filter('registration_errors', 'registration_errors_validation', 10,3);
    function registration_errors_validation($reg_errors, $sanitized_user_login, $user_email) {
    		global $woocommerce;
    		extract($_POST); // extracting $_POST into separate variables
    		if($firstname == '' ) {
    			$woocommerce->add_error( __( 'Please, fill in all 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);
    
            // can also do multiple fields like that
            update_user_meta($user_id, 'first_name', $firstname);
    	update_user_meta($user_id, 'billing_first_name', $firstname);
    	update_user_meta($user_id, 'shipping_first_name', $firstname);
    }

    Thats about it! Would advice wordpress developers learn more about hooks and filters! they make everything so much more easier!

    Have a good day!

    hey did you ever get anything with that?
    i am looking into developing a website now with that functionality and will do some of the custom development myself. maybe we can combine forces?
    thanks!

    Just updated wordpress and the plugin.
    there is one bug if your website using https connection.
    in line 127-129 of audio-player.php

    if ($_SERVER[“HTTPS”] == “on” || $_SERVER[“SERVER_PORT_SECURE”] == “1”) {
    $this->pluginURL = str_replace(“http”, “https”, $this->pluginURL);
    }
    the pluginURL ends up being httpss… which breaks the whole plugin if you are using ssl.

    to fix that just comment out the middle line like this
    // $this->pluginURL = str_replace(“http”, “https”, $this->pluginURL);

    +1
    have anyone found a solution?

    ссылку дай?

    Have a problem here.
    i have a wordpress 3.3.1 and yoast SEO 1.1.9
    and in SEO -> Titles i have description set up and title but when it goes to second page i have no title nor description. and on the first page the %%page%% is not converted in description to the page number but still keeps as %%page%%.
    you can see what i mean here
    http://www.visualitee.com/shop
    http://www.visualitee.com/shop/page/2

    is there a way to fix it or go around it? thanks!

Viewing 6 replies - 1 through 6 (of 6 total)