• Resolved metalhead505

    (@metalhead505)


    Hello,

    I’m using get_avatar_url() to return user avatar url, but it returns it as http instead of https. My desired result is to have it return the url as https.

    This is what I’ve tried:

    $user = wp_get_current_user();
    $args = array('scheme' => 'https'); 
    $chat_picture_url = get_avatar_url($user->ID, $args);
    

    However, the url is still being returned as http.

    Is there anything wrong with my code that would cause it to fail? I don’t have any logged php errors.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get_avatar_url() with https’ is closed to new replies.