WooCommerce - excelling eCommerce
Shortcode To Check For Logged In User? (2 posts)

  1. Bob Rockefeller
    Posted 2 years ago #

    Is there a WooCommerce shortcode to check for which user is logged in to use to control what content is shown? Perhaps it would look something like:

    [woocommerce username= "someone" status="in"]
    Show content specific to someone

    If not that, maybe a generic someone is logged in short code:

    [woocommerce status="in"]
    Show content if any user is logged in



  2. royho
    Plugin Author

    Posted 2 years ago #

    This is not really a WooCommerce thing but more of a WordPress native function.

    You can always call is_user_logged_in() function to check if someone is logged in. It returns a boolean. However if you need that to work in a shortcode, you would need to build a custom shortcode for that.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic