karbanovich
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Add fields to woocommerce registration formHello 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!
Forum: Plugins
In reply to: [WooCommerce] Selling songs within albumshey 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!Forum: Plugins
In reply to: [Audio Player] Audio Player not workingJust updated wordpress and the plugin.
there is one bug if your website using https connection.
in line 127-129 of audio-player.phpif ($_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);Forum: Plugins
In reply to: [WP Customer Reviews] [Plugin: WP Customer Reviews] more ratings+1
have anyone found a solution?Forum: Plugins
In reply to: Ошибка плагина WP Customer Reviewsссылку дай?
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/2is there a way to fix it or go around it? thanks!