Skip to content

Instantly share code, notes, and snippets.

@dasbairagya
Last active July 8, 2020 15:00
Show Gist options
  • Select an option

  • Save dasbairagya/35e84f9a7529349cfec8a1941a6d5391 to your computer and use it in GitHub Desktop.

Select an option

Save dasbairagya/35e84f9a7529349cfec8a1941a6d5391 to your computer and use it in GitHub Desktop.
Add login button for beside add to cart for logout user
<?php
function wishlist_check(){
if(!is_user_logged_in()){
echo '<a class="woo-login-popup-sc-open">Login</a>';
}
}
add_action('woocommerce_single_product_summary','wishlist_check',30);
@dasbairagya
Copy link
Copy Markdown
Author

You need woocommerce login popup lugin plugin to be pre installed:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment