• Resolved Wayne

    (@waynep16)


    I can’t seem to find the correct code to add the avatar upload to
    account/edit-account/ page used when editing your details for WooComcerce?

    Also is there a way to stop avatars being added to the media library for the site?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Wayne

    (@waynep16)

    Is there anyone able to assist on this?

    I have hooked it in to the woo edit profile spot using this code

    // Add to edit_user_avatar hook
    add_action(‘woocommerce_edit_account_form’, array(‘wp_user_avatar’, ‘wpua_action_show_user_profile’));
    add_action(‘woocommerce_edit_account_form’, array(‘wp_user_avatar’, ‘wpua_media_upload_scripts’));

    but when you save page, nothing happens, the avatar does not save

    • This reply was modified 3 years, 9 months ago by Wayne.

    Hi Wayne,

    I also want to add the ability to upload an avatar from the WooCommerce account page. Did you find a solution for this?

    Thanks,

    Hi Wayne,

    I found the solution. You don’t need to add a hook. Just add the shortcode [avatar_upload] to the WooCommerce account page. FYI…If an admin clicks on “Choose Image” from the WooCommerce account page, the main media library opens. But, if it is a user or customer changing their avatar image, the button says, “Browse” and it goes to the user’s files on their device.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add upload form to Woocomrce edit profile page?’ is closed to new replies.