save_account_details should check display name of current user.

Fixes #8856
This commit is contained in:
Mike Jolley 2015-08-17 12:02:16 +01:00
parent 7f247880cc
commit ad691fe916
2 changed files with 2 additions and 1 deletions

View File

@ -171,7 +171,7 @@ class WC_Form_Handler {
$user->user_email = $account_email;
// Prevent emails being displayed, or leave alone.
$user->display_name = is_email( $user->display_name ) ? $user->first_name : $user->display_name;
$user->display_name = is_email( $current_user->display_name ) ? $user->first_name : $current_user->display_name;
if ( empty( $account_first_name ) || empty( $account_last_name ) ) {
wc_add_notice( __( 'Please enter your name.', 'woocommerce' ), 'error' );

View File

@ -160,6 +160,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
== Changelog ==
* Fix - Global text based attribute saving on product page.
* Fix - save_account_details should check display name of current user.
* Tweak - Allowed Zip/Post Codes description for Local Delivery.
= 2.4.4 - 14/08/2015 =