WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » Shortcode To Check For Logged In User?

Shortcode To Check For Logged In User?

  • 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
    [/woocommerce]

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

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

    Bob

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 1 replies (of 1 total)
  • Plugin Author royho

    @royho

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Shortcode To Check For Logged In User?’ is closed to new replies.
Skip to toolbar