WooCommerce Advanced Accounts Premium / Configuration July 17, 2026

Use Membership Shortcodes

Use WooCommerce membership shortcodes to display member-only content, account details, or membership information on pages.

Applies to 2.1.2+ Stable Verified July 29, 2026

The membership shortcode lets you control small pieces of page or post content without restricting the entire page.

Basic Role-Based Shortcode

Use the role slug from the Membership rules table:

[yoaa_membership level="gold_member"]
Content for Gold members only.
[/yoaa_membership]

Replace gold_member with the actual membership role slug shown in your settings.

Show a Custom Message

You can display a message when the visitor does not have access:

[yoaa_membership level="gold_member" message="This content is available for Gold members only."]
Gold member content goes here.
[/yoaa_membership]

Hide Content Without a Notice

Use hide="yes" when restricted content should disappear instead of showing a WooCommerce notice:

[yoaa_membership level="gold_member" hide="yes"]
Private offer for Gold members.
[/yoaa_membership]

Guest or Logged-In Content

The shortcode also supports visitor state rules:

[yoaa_membership guest="yes"]
Content only for guests.
[/yoaa_membership]
[yoaa_membership logged_in="yes"]
Content only for logged-in customers.
[/yoaa_membership]

When to Use Shortcodes

  • Use shortcodes for sections inside a page.
  • Use content access rules when the entire page should be restricted.
  • Use product access rules when the product itself should be protected.

Testing Shortcodes

  1. Publish the page with the shortcode.
  2. View it while logged out.
  3. View it as a non-member customer.
  4. View it as a member with the correct role.

This confirms that guests, regular customers, and members see the intended version.

Related Guides

Continue from WooCommerce Advanced Accounts Premium documentation to the complete product workflow.

Evaluate product scope on the money page, use the pillar Guide for decisions and trade-offs, and return here for exact configuration.

Need support?

Still stuck?

Open a support request and include this article title, your plugin version, and what you already tried.

Open Support