Skip to content

Documentation

WooRewards

  1. Home
  2. Docs
  3. WooRewards
  4. Legacy
  5. Shortcodes
  6. Shortcodes

Shortcodes

This documentation is for the WooRewards plugin

The following shortcodes are only available as shortcodes. As such, they don’t have a widget or endpoint counterpart.

Summary

Simple Points display

Use this simple shortcode to display the points for a specific points and rewards system with no decoration. For example, this is very convenient if you want to display points within a phrase.

[wr_simple_points system="system_name"]

  • Attribute : Description
  • system : The points and rewards system you want to display. You can find this value in WooRewards → Points and Rewards, in the Shortcode Attribute column. If you don’t set this value, nothing will be displayed.
  • raw : (Optional) If set to true, the result will be displayed as a simple text. Otherwise, it will be wrapped in stylable elements.

 

Points value display

This simple shortcode is used to display how much his points are worth. This only works if your points and rewards system is set to points on cart.

[wr_points_value system="set the name of your system here"]

  • Attribute : Description
  • system : The points and rewards system you want to display. You can find this value in WooRewards → Points and Rewards, in the Shortcode Attribute column. If you don’t set this value, nothing will be displayed.
  • text : (Optional) The text displayed before the points value.
  • raw : (Optional) If set to true, the result will be displayed as a simple text. Otherwise, it will be wrapped in stylable elements.

 

User Name and Title

This shortcode displays the user name and title. Therefore, customers must earn a title if they want to see it.

[wr_user_name title="yes" raw="no"]

  • Attribute : Description
  • title : Shows the title if user unlocked a title reward.
  • raw : (Optional) If set to true, the result will be displayed as a simple text. Otherwise, it will be wrapped in stylable elements.

 

Points to next level

This shortcode displays the points needed to reach the next level/reward of a points and rewards system. Use it to motivate customers to reach a higher level.

[wr_next_level_points system="system_name"]

  • Attribute : Description
  • system : The points and rewards system you want to display. You can find this value in WooRewards → Points and Rewards, in the Shortcode Attribute column. If you don’t set this value, nothing will be displayed.
  • prefix : (Optional) The text displayed before the points needed.
  • suffix : (Optional) The text displayed after the points needed.
  • currency : (Optional) If set, the points will be displayed with the points and rewards system’s currency.

 

Points on Cart Tool

This shortcode is used to display the Points on Cart tool. You can customize its appearance in the WooCommerce Tab.

[wr_points_on_cart system='system_name']

  • Attribute : Description
  • system : The points and rewards system you want to display. You can find this value in WooRewards → Points and Rewards, in the Shortcode Attribute column. If you don’t set this value, nothing will be displayed.

 

Maximum Point Amount on Cart

This shortcode will show the maximum quantity of Point that could be used on this cart.

[wr_max_points_on_cart system='system_name' raw='']

  • Attribute : Description
  • system : The points and rewards system you want to display. You can find this value in WooRewards → Points and Rewards, in the Shortcode Attribute column. If you don’t set this value, nothing will be displayed.
  • raw : (Optional) If set to true, the result will be displayed as a simple text. Otherwise, it will be wrapped in stylable elements.

 

User Level

This shortcode displays the current user level in a leveling points and rewards system.

[wr_user_level system="system_name" nolevel="No level message"]

  • Attribute : Description
  • system : The points and rewards system you want to display. You can find this value in WooRewards → Points and Rewards, in the Shortcode Attribute column. If you don’t set this value, nothing will be displayed.
  • nolevel : The text displayed if the user didn’t reach the first level.

 

Progress bar

This shortcode displays a progress bar for a points and rewards system. This is very useful to incentivize customers to reach a higher level.

[wr_progress_bar system="system_name" header="Your Current Progress"]

  • Attribute : Description
  • system : The points and rewards system you want to display. You can find this value in WooRewards → Points and Rewards, in the Shortcode Attribute column. If you don’t set this value, nothing will be displayed.
  • header : The text displayed before the progress bar.

 

You can edit this shortcode’s style directly in WooRewards

Instructions

Go to WooRewards → Appearance → Shortcodes → Shortcodes → Progress Bar.

Select the elements you want to customize and change the values you want.

Save your settings.

 

Points History

This shortcode displays a user’s points history for one or several points and rewards systems.

[wr_show_history system='system_name1,system_name2' count='15']

  • Attribute : Description
  • system : The points and rewards system you want to display. You can find this value in WooRewards → Points and Rewards, in the Shortcode Attribute column. If you don’t set this value, nothing will be displayed.
  • count : (Optional) The number of rows displayed. Default is 15.

 

You can edit this shortcode’s style directly in WooRewards

Instructions

Go to WooRewards → Appearance → Shortcodes → Shortcodes → Points History.

Select the elements you want to customize and change the values you want.

Save your settings.

 

Leaderboard

This shortcode is not enabled by default as it requires some extra consentment from customers.
To enable it, go to MyRewards → Features → General Features, in the Advanced Features group. Check the Enable the leaderboard shortcode checkbox and save your settings.

 

Information

If you enable the shortcode, your customers will see a new field on their account page. They can check a box if they don’t want to appear on the leaderboard.

 

This shortcode displays a leaderboard of your customers for a specific Points and Rewards System.

[wr_leaderboard system='set the name of your system here']

  • Attribute : Description
  • system : The points and rewards system you want to display. You can find this value in WooRewards → Points and Rewards, in the Shortcode Attribute column. If you don’t set this value, nothing will be displayed.
  • count : (Optional) The number of rows displayed. Default is 15.
  • columns : (Optional) The Columns to display (comma separated). The order in which you specify the columns will be the grid columns order. If not specified, the leaderboard will display the rank, user nickname and points total of the users.
    Here are the different options available

    • rank : The user’s rank in the leadeboard.
    • user_nickname : The user’s display name.
    • points : The user’s points in the points and rewards system.
    • badges : The badges owned by the customer. This will display the badges images and their titles on mouseover.
    • last_badge : The last badge earned by the customer. This will display the badge image and its title on mouseover.
    • achievements : The achievements unlocked by the customer. This will display the unlocked badges images and their titles on mouseover.
    • user_title : Displays the user title if he earned one.
    • title_date : Displays when the user earned his/her title.
  • columns_headers : (Optional) The column headers (comma separated). Must be specified if you specified the columns option. The headers must respect the same order than the ones of the previous option.
  • badge_ids : (Optional) Restriction to specific badges (comma separated). By default, all badges can be displayed in the relevant columns. You can restrict that to a specific list of badges.
  • achievement_ids : (Optional) Restriction to specific achievements (comma separated). By default, all achievements can be displayed in the relevant columns. You can restrict that to a specific list of achievements.

Points Expiration

This shortcode displays the date where user points will expire. It only works for inactivity points expiration.

[wr_points_expiration system='set the name of your system here']

  • Attribute : Description
  • system : The points and rewards system you want to display. You can find this value in WooRewards → Points and Rewards, in the Shortcode Attribute column. If you don’t set this value, nothing will be displayed.
  • format : (Optional) use it with the key days to show the value in days.
  • raw : (Optional) If set to true, the result will be displayed as a simple text. Otherwise, it will be wrapped in stylable elements.

Transactional Points Expiration

This shortcode displays a table with history of points and expiration date.

[wr_transactional_points_expiration system='set the name of your system here']

  • Attribute : Description
  • system : The points and rewards system you want to display. You can find this value in WooRewards → Points and Rewards, in the Shortcode Attribute column. If you don’t set this value, nothing will be displayed.
  • force : (Optional) If set, the points will be shown even if the user currently doesn’t have access to the points and rewards system.
  • columns : (Optional) The list of columns to display in ‘system, points, expiry, reason, date’. Defaults is ‘points, expiry’.
  • titles : (Optional) The list of columns titles. If not provided, default titles are used. Set it empty for no header at all.
Scroll To Top