• Resolved 4ugustin

    (@4ugustin)


    Is there a way to always show current account and switch button. For instance in the top menu?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author mediaticus

    (@mediaticus)

    Hi @4ugustin

    Thanks for reaching out.

    In order to move the User Switcher panel to another location, you need to place the following piece of code in your child theme’s functions.php file:

    function sfwc_change_user_switcher_position() {
    remove_action( 'woocommerce_before_account_navigation', 'sfwc_action_woocommerce_account_dashboard' );
    add_action('user_switcher_custom_position', 'sfwc_action_woocommerce_account_dashboard');
    }
    add_action( 'init', 'sfwc_change_user_switcher_position' );

    and put the following piece of code (remeber to add PHP tags if necessary) where you want the User Switcher to appear (e.g. in the header of your child theme):

    do_action( 'user_switcher_custom_position' );

    Hope this helps.

    Thread Starter 4ugustin

    (@4ugustin)

    Great, thanks! I’ll test this. 🙏

    Thread Starter 4ugustin

    (@4ugustin)

    It works just fine! Thanks. 

    How can I update CSS to have it all in 1 line instead of 3? Something like this: 

    [Select Account =     v] You are currently logged in as: Company: Company Test (email address)

    • This reply was modified 11 months, 1 week ago by 4ugustin.
    Plugin Author mediaticus

    (@mediaticus)

    Hi @4ugustin

    I’m glad it works.

    As for the CSS modification, you can try adding the following rules in the WordPress customizer:

    #sfwc-user-switcher-pane {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
    margin: 15px 0 15px;
    }
    #sfwc-user-switcher-pane form {
    order: 1;
    margin: auto;
    }
    #sfwc-user-switcher-pane h3 {
    order: 2;
    margin: auto 5px auto auto;
    }
    #sfwc-user-switcher-pane p {
    order: 3;
    margin: auto auto auto 0;
    }

    Hope this helps.

    Plugin Author mediaticus

    (@mediaticus)

    We haven’t heard from you in a while so I’m going to go ahead and mark this thread as resolved.

    If you have any other questions about the plugin, please start a new thread.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Always showing current account (and switch button)’ is closed to new replies.