Learn about advanced integration with WooCommerce Memberships plugin.
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:
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.
Integration with WooCommerce Memberships adds a large number of such custom text variables. Below we will cover all of them.
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.
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.
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.
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.
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.
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.
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.
Integration with WooCommerce Memberships adds a bunch of new label display conditions. We will cover them in the next section.
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.
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.
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.
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.
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.
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.
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.
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.