E
E
Evij212021-04-16 16:38:59
WordPress
Evij21, 2021-04-16 16:38:59

How to replace login button with logout in woocommerce after user login?

How to replace login button with logout in woocommerce after user login?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Litvinenko, 2021-04-16
@Evij21

<div class="sign-in-wrap">
  <?php if (is_user_logged_in()): ?>
    <a href="/my-account/customer-logout" class="sign-in-btn"><?php _e('Выйти', 'textdomain') ?></a>
  <?php else: ?>
    <button>Тут твоя кнопка, которая ведет на страницу авторизации</button>
  <?php endif; ?>
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question