GET FREE VERSION GET THE PRO VERSION

WooCommerce Memberships

Learn about advanced integration with WooCommerce Memberships plugin.

In this article
Following article describes features available only with PRO plugin version.

Overview

Key features of integration:
  • Labels custom text variables. Show some specific WooCommerce Memberships values as label text.
  • Display rules. Show/hide labels based on WooCommerce Memberships specific parameters.

WooCommerce Memberships is an advanced membership plugin. It gives the option to build complex membership sites with different plans, content access restriction and memberships selling.

Advanced Woo Labels PRO ( AWL ) has built-in advanced integration with WooCommerce Memberships plugin.

With this integration you can show information like current users membership plan, user membership discount, plans that product purchase grants access to and many more right inside your products label via text variables.

Additionally you can set labels display conditions based on WooCommerce Memberships data.

Examples of use:

1. Show current user membership product discount:

2. Promote what discount users can get with a specific membership plan:

3. Mention that only specific members can purchase the product:

Text variables

With the help of text variables you can display product related dynamic content inside labels.

To use such text variables simply go to the label edit page and add any variable from the list of available ones into Label text option.

List of text variables

List of text variables

Integration with WooCommerce Memberships adds a large number of such custom text variables. Below we will cover all of them.

Current user membership

Current user membership text variable

Current user membership text variable

Display current user membership plan. Will show an empty string if the user is not logged-in or doesn't have any membership plan.

To make sure that label is shown for users with membership use Is current user is a member display condition.

To display such a badge inside a label just use the {WCMEMBER_USER_MEMBERSHIP} text variable.

Steps to display this text variable:

1. Open label edit page of a label that needs to be changed.

2. Find Label text option ( available only for Shape with text label type ) and set {WCMEMBER_USER_MEMBERSHIP} inside it.

{WCMEMBER_USER_MEMBERSHIP} text variable

{WCMEMBER_USER_MEMBERSHIP} text variable

Current member product discount amount

Current user discount amount text variable

Current user discount amount text variable

Show current user discount amount associated with its membership plan. Will show 0 value if the user doesn't have any discount or he is not a member.

To display such a badge inside a label just use the {WCMEMBER_DISCOUNT_AMOUNT} text variable.

Steps to display this text variable:

1. Open label edit page of a label that needs to be changed.

2. Find Label text option ( available only for Shape with text label type ) and set {WCMEMBER_DISCOUNT_AMOUNT} inside it.

{WCMEMBER_DISCOUNT_AMOUNT} text variable

{WCMEMBER_DISCOUNT_AMOUNT} text variable

Current member product discount percentage

Current user discount percentage text variable

Current user discount percentage text variable

Show current user discount percentage associated with its membership plan. Will show 0 value if the user doesn't have any discount or he is not a member.

To display such a badge inside a label just use the {WCMEMBER_DISCOUNT_PERCENT} text variable.

Steps to display this text variable:

1. Open label edit page of a label that needs to be changed.

2. Find Label text option ( available only for Shape with text label type ) and set {WCMEMBER_DISCOUNT_PERCENT} inside it.

{WCMEMBER_DISCOUNT_PERCENT} text variable

{WCMEMBER_DISCOUNT_PERCENT} text variable

Product grant access to

'Grant access to' text variable

'Grant access to' text variable

Comma separated list of memberships that current product purchase grants access to. Will show empty strings if there are no such.

To display such a badge inside a label just use the {WCMEMBER_GRANT_ACCESS_TO} text variable.

Steps to display this text variable:

1. Open label edit page of a label that needs to be changed.

2. Find Label text option ( available only for Shape with text label type ) and set {WCMEMBER_GRANT_ACCESS_TO} inside it.

{WCMEMBER_GRANT_ACCESS_TO} text variable

{WCMEMBER_GRANT_ACCESS_TO} text variable

Memberships that can purchase current product

'Membership plans that can purchase' text variable

'Membership plans that can purchase' text variable

Comma separated list of memberships with access to purchase current product. Will show empty strings if there are no such.

To display such a badge inside a label just use the {WCMEMBER_WHO_CAN_PURCHASE} text variable.

Steps to display this text variable:

1. Open label edit page of a label that needs to be changed.

2. Find Label text option ( available only for Shape with text label type ) and set {WCMEMBER_WHO_CAN_PURCHASE} inside it.

{WCMEMBER_WHO_CAN_PURCHASE} text variable

{WCMEMBER_WHO_CAN_PURCHASE} text variable

Memberships to which current product is restricted

'Restricted for' text variable

'Restricted for' text variable

Commas separated list of memberships to which current product is restricted. Will show empty strings if there are no such.

To display such a badge inside a label just use the {WCMEMBER_RESTRICTED_TO} text variable.

Steps to display this text variable:

1. Open label edit page of a label that needs to be changed.

2. Find Label text option ( available only for Shape with text label type ) and set {WCMEMBER_RESTRICTED_TO} inside it.

{WCMEMBER_RESTRICTED_TO} text variable

{WCMEMBER_RESTRICTED_TO} text variable

Display conditions

With label display conditions you can set special rules that the current product/page/user must match in order to show the label.

You can set such display conditions from the label edit page -> Label Conditions box.

Label display conditions option

Label display conditions option

Integration with WooCommerce Memberships adds a bunch of new label display conditions. We will cover them in the next section.

Current user membership

Display the label only for users with certain membership. Or display it for everyone except users with specific membership.

Such conditions can be set via Current user membership label display condition.

Steps to set this label display condition:

1. Open the label edit page and find the Label Conditions box.

2. Set new condition - Current user membership. Also set a compare operator and value ( membership name ) depending on your needs.

'Current user membership' label display condition

'Current user membership' label display condition

Is current user can purchase product

Show label only for users that have access to purchase the product. Or vice versa hide labels for all users that can purchase current products.

Such conditions can be set via Current user can purchase label display condition.

Steps to set this label display condition:

1. Open the label edit page and find the Label Conditions box.

2. Set new condition - Current user can purchase. Also set a compare operator and value ( Yes or No ) depending on your needs.

'Current user can purchase' label display condition

'Current user can purchase' label display condition

Is current user can view product

Show label only for users that have access to view the product. Or vice versa hide labels for all users that can view current products.

Such conditions can be set via Current user can view label display condition.

Steps to set this label display condition:

1. Open the label edit page and find the Label Conditions box.

2. Set new condition - Current user can view. Also set a compare operator and value ( Yes or No ) depending on your needs.

'Current user can view' label display condition

'Current user can view' label display condition

Is the current user has a product discount

Show label only if the current user has a membership discount for the product. Or hide labels for all users with such discounts.

Such conditions can be set via Current user has discount label display condition.

Steps to set this label display condition:

1. Open the label edit page and find the Label Conditions box.

2. Set new condition - Current user has discount. Also set a compare operator and value ( Yes or No ) depending on your needs.

'Current user has discount' label display condition

'Current user has discount' label display condition

Product has discount for {membership plan}

Show label only if current product has discount for specific membership plan. Or hide labels for all products with such membership plan discounts.

Such conditions can be set via Product has discount for label display condition.

Steps to set this label display condition:

1. Open the label edit page and find the Label Conditions box.

2. Set a new condition - Product has discount for. Also set a compare operator and value ( membership plan name ) depending on your needs.

'Product has discount for' label display condition

'Product has discount for' label display condition

Product grant access to {membership plan}

Show labels only for products that grant access to X membership. Or vice versa hide labels for products that grant access to X membership.

Such conditions can be set via Product grant access to label display conditions.

Steps to set this label display condition:

1. Open the label edit page and find the Label Conditions box.

2. Set a new condition - Product grant access to. Also set a compare operator and value ( membership plan name ) depending on your needs.

'Product grant access to' label display condition

'Product grant access to' label display condition

{membership plan} can purchase product

Show label only for products that can be purchased by X membership plan. Or vice versa hide labels for products that can be purchased by X membership plan.

Such conditions can be set via Who can purchase product label display conditions.

Steps to set this label display condition:

1. Open the label edit page and find the Label Conditions box.

2. Set a new condition - Who can purchase product. Also set a compare operator and value ( membership plan name ) depending on your needs.

'Who can purchase product' label display condition

'Who can purchase product' label display condition

{membership plan} can view product

Show label only for products that can be viewed by X membership plan. Or vice versa hide labels for products that can be viewed by X membership plan.

Such conditions can be set via Who can view product label display conditions.

Steps to set this label display condition:

1. Open the label edit page and find the Label Conditions box.

2. Set a new condition - Who can view product. Also set a compare operator and value ( membership plan name ) depending on your needs.

'Who can view product' label display condition

'Who can view product' label display condition