Home Forums WoodMart support forum Displays a different logo based on customer custom field

Displays a different logo based on customer custom field

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #558717

    sitireggiocal
    Participant

    Hi
    I run a marketplace with wcfm plugins.
    Furthermore, each customer can choose a store to affiliate with, the choice is saved in the affiliated_store_id user details
    I want that when a user affiliated with shop1 logs in, they see the shop1 logo and not the default one of the site
    Same for all users

    Previously I used the gizmos theme and the function shown below.
    How to adapt it for the current theme?

    Thanks

    add_filter(‘gizmos_core_filter_get_header_logo_image’, ‘change_header_logo_image’, 999, 2);

    function change_header_logo_image($logo_image, $parameters)
    {

    $user_id = get_current_user_id();
    $affiliated_store = get_user_meta($user_id, ‘affiliated_store’, true);
    if (!empty($affiliated_store)) {
    $store_id = get_user_meta($user_id, ‘affiliated_store_id’, true);
    // Get store
    $store = wcfmmp_get_store($store_id);
    // Get store logo
    $store_logo = $store->get_avatar();
    if (!empty($store_logo)) {
    // unset($logo_image[‘logo_main_image’]);
    $logo_image = ‘‘;
    }
    }

    return $logo_image;
    }

    #559074

    Hung Pham
    Keymaster

    Hi sitireggiocal,

    Thanks for reaching to us and appreciate your patience.

    Unfortunately, additional customization is outside the scope of our basic support.

    Thanks for your understanding.

    Regards,

Viewing 2 posts - 1 through 2 (of 2 total)