Skip to content

Instantly share code, notes, and snippets.



Last active Aug 25, 2015
What would you like to do?
Function - Show the price only after logging
* Function - Show the price only after logging
function show_price_logged($price){
if( is_user_logged_in() ){
return $price;
} else {
return '<a href="' .get_permalink(woocommerce_get_page_id('myaccount')). '" title="Já tenho Conta" class="btn-myaccount">Já tenho Conta</a> ou <a href="' .get_permalink(woocommerce_get_page_id('myaccount')). '" title="Registrar para visualizar o preço!" class="btn-registrar">Registrar para visualizar o preço!</a>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.