Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @nicole2292 could you explain your work around please, thank you

    Forum: Plugins
    In reply to: [Switch User] Switch User
    Thread Starter cevans247

    (@cevans247)

    One other item, is it possible to add to child theme, thank you

    Forum: Plugins
    In reply to: [Switch User] Switch User
    Thread Starter cevans247

    (@cevans247)

    Thanks sorted it

    foreach ( $users as $user ) {

    $billing_company = get_user_meta( $user->ID, ‘billing_company’, true );

    if ($user->ID == $current_user_id ) {
    echo ‘<li class=”current-user” data-user-id=”‘ . $user->ID . ‘” title=”‘ . __(“You are logged as this user”, SWITCH_USER_TEXTDOMAIN) . ‘”>’ . $billing_company . ‘‘;
    } else {
    echo ‘<li class=”js-su-user” data-user-id=”‘ . $user->ID . ‘” title=”‘ . __(“Click to login as this user”, SWITCH_USER_TEXTDOMAIN) . ‘”>’ . $billing_company . ‘‘;
    }
    }

    Forum: Plugins
    In reply to: [Switch User] Switch User
    Thread Starter cevans247

    (@cevans247)

    Hi Mario,

    Tried to get the required result but no luck: any ideas how to get billing company name displayed, thank you

    echo ‘<li class=”current-user” data-user-id=”‘ . $user->billing_company . ‘” title=”‘ . __(“You are logged as this user”, SWITCH_USER_TEXTDOMAIN) . ‘”>’ . $user->user_login . ‘‘;
    } else {
    echo ‘<li class=”js-su-user” data-user-id=”‘ . $user->billing_company . ‘” title=”‘ . __(“Click to login as this user”, SWITCH_USER_TEXTDOMAIN) . ‘”>’ . $user->user_login . ‘‘;

    Forum: Plugins
    In reply to: [Switch User] Switch User
    Thread Starter cevans247

    (@cevans247)

    Thank you I will take a look, have a great weekend too

Viewing 5 replies - 1 through 5 (of 5 total)