How to force field validation first, then its values saved durning edit profile?

Unfortunately I didn’t receive any reply. I did it a little different … and it works. I just combine them both and I have that result which works fine. add_action( ‘user_profile_update_errors’, ‘validate_steamid_field’ , 10, 3); function validate_steamid_field(&$validation_errors, $update = null, &$user){ if ( isset( $_FILES[‘custom_avatar’] ) && !empty($_FILES[‘custom_avatar’]) && file_exists($_FILES[‘custom_avatar’][‘tmp_name’]) ) { //we check if … Read more

‘profile_update’ hook alternative for WooCommerce user meta data

My solution would be this: function get_all_user_data($user_id) { $user_data = get_userdata($user_id); $login = $user_data->user_login; $customer_array = new WC_Customer( $user_id ); $customer = $customer_array->get_data(); $billing_first_name = $customer[billing][first_name]; $shipping_first_name = $customer[shipping][first_name]; } add_action(‘user_register’,’get_all_user_data’); add_action(‘profile_update’,’get_all_user_data’); The array setup for the Customer arrays [billing] and [shipping] is as so (you can just change my values and get different data … Read more

Enable Update button only when password is shown strong

I am using jquery for this, please put this code inside the function.php of your theme. add_action(‘admin_head’,’custom_handler_for_pass_js’); if ( ! function_exists( ‘custom_handler_for_pass_js’ ) ) { function custom_handler_for_pass_js() { ?> <script type=”text/javascript”> jQuery( document ).ready(function() { jQuery(‘.wp-generate-pw’).click(function(){ jQuery(“#pass1”).keyup(function(){ if(jQuery( “#pass1” ).hasClass( “strong” )){ jQuery(‘#submit’).prop(‘disabled’, false); }else{ jQuery(‘#submit’).prop(‘disabled’, true); } }); }); }); </script> <?php }} This … Read more