[themify_is_logged_in]
[php]</p> <p>function registration_save( $user_id ) {</p> <p> if ( isset( $_POST[ ‚display_name‘ ] ) ) {</p> <p> wp_update_user( array(<br> ‚ID‘ =&amp;gt; $user_id,<br> ‚user_nicename‘ =&amp;gt; sanitize_user( $_POST[ ‚display_name‘ ] )<br> ) );</p> <p> update_user_meta( $user_id, ’nickname‘, $_POST[ ‚display_name‘ ] );<br> }</p> <p>}<br> add_action(‚woocommerce_created_customer‘, ‚registration_save‘, 10 , 1 );</p> <p>#### Edit Profile ####</p> <p>function edit_save( $user_id ) {</p> <p> if ( isset( $_POST[ ‚display_name‘ ] ) ) {</p> <p> wp_update_user( array(<br> ‚ID‘ =&amp;gt; $user_id,<br> ‚user_nicename‘ =&amp;gt; sanitize_user( $_POST[ ‚display_name‘ ] )<br> ) );</p> <p> update_user_meta( $user_id, ’nickname‘, $_POST[ ‚display_name‘ ] );<br> }<br> }<br> add_action( ‚woocommerce_update_customer‘, ‚edit_save‘, 10, 1 );</p> <p>[/php]
account_display_name
[/themify_is_logged_in]