New answers tagged

0

You said that KingComposer will accept PHP blocks. This will generate a link to the current logged-in user's author page: <?php $author_page = is_user_logged_in() ? get_author_posts_url( get_current_user_id() ) : NULL; $acc_pay_page = $author_page ? add_query_arg( 'screen', 'acc_pay', $author_page ) : NULL; if ( $acc_pay_page) { echo '<a href="...


0

I got it working. The key was the woocommerce_update_customer action. In the end my function was triggered only by these two actions: add_action('user_register','get_all_user_data', 99); add_action('woocommerce_update_customer','get_all_user_data', 99); I don't need the profile_update because I don't need to track changes in default WP's user data. However ...


0

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][...


Top 50 recent answers are included