‘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

adding custom user input fields in WordPress admin dashboard gives error The link you followed has expired. Please try again

That error messages means a failed admin nonce validation (check_admin_referer, which calls wp_nonce_ays). And you don’t actually need an extra nonce here: these are extra fields to be added to existing forms that already have their own nonces, and the one you’ve added just clashes with them. (If you were adding a new form you … Read more

set a user-meta key as avatar

<?php $id = get_current_user_id(); // this is for the current user, for other user just change this variable to the user id intended $link = get_user_meta( $id, ‘avatar’, true ); ?> <img src=”<?php echo $link ?>” alt=””> That is your answer, but if you want to understand it just continue reading!.. (only after writing everything … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)