Last active
December 16, 2015 10:29
-
-
Save renanlara/5420607 to your computer and use it in GitHub Desktop.
WooCommerce - Exibe o número de itens do carrinho de compras
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php global $current_user; if ( isset($current_user) ) { echo "Seja bem-vindo, "; echo $current_user->user_login; } ?> | |
<?php global $user_ID; | |
if($user_ID) { | |
echo '<class="login"><a href="' . site_url('minha-conta/logout/', 'login') . '">' . __('(Sair)', 'atahualpa') . '</a>'; | |
} else { | |
echo '<class="login"><a href="' . site_url('minha-conta/', 'login') . '">' . __('Faça seu Login', 'atahualpa') . '</a>'; } ?> | |
<?php global $current_user; if ( isset($current_user) ) { echo "ou "; } ?> | |
<?php global $user_ID; | |
if($user_ID) { | |
echo '<class="login"><a href="' . site_url('minha-conta/', 'login') . '">' . __('Minha Conta', 'atahualpa') . '</a>'; | |
} else { | |
echo '<class="login"><a href="' . site_url('minha-conta/', 'login') . '">' . __('Cadastre-se!', 'atahualpa') . '</a>'; } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment