WordPress MicroPayments (CMMP) - Shortcodes - Wallet Management, Transfer, Checkout, Discount


WordPress MicroPayments Shortcodes

Back to User Guides

TIP: What Are Shortcodes

Shortcodes add dynamic content to your site via a small piece of code. Learn more: Shortcodes - How To Use

This page contains a list of the shortcodes you can use in the WordPress MicroPayments

There are many possibilities, so we have grouped the shortcodes into groups:

  1. Wallet Management Shortcodes
  2. Transfer and Payment Shortcodes
  3. Checkout Shortcodes
  4. Discount Shortcodes
  5. Admin/Editor Management Shortcodes

1) Wallet Management Shortcodes

Create Wallet and Change Wallet Nickname Button

Shortcode: [create_wallet_button]

Description: Shows the button which – once clicked – creates a new wallet code to display the wallet. This action is done with an AJAX request so it doesn’t reload the page also front user able to change wallet nickname with this shortcode.

On success, the wallet code will be displayed. You can choose to hide the button by enabling the option "Hide button after wallet creation".

Below: After the "Create Wallet" button has been clicked, the wallet code is displayed. The user should save or remember their wallet code and use it when asked.

Creating a new wallet - WordPress User Wallet Credit System
Creating a new wallet

Changing Wallet Nickname

Since the version 2.1.0 it is possible to assign a nickname to each wallet. This way, users don't have to use Wallet IDs that are long and difficult for remembering, they can use a Wallet Nickname instead of it.

The users can change the nicknames of their wallets on the front-end at any moment. It is done by the same shortcode. When the wallet is already created, the user can see the field with his Wallet ID. He needs just to write there a new nickname and click Update.

Changing a wallet nickname - WordPress Wallet Plugin
Changing a wallet nickname

It works the same for one or multiple wallets.

Show Wallet History

Shortcode[cm_user_wallet]

Description: If user is logged in, shows latest transactions on wallet.

Showing the wallet transaction history - WordPress Point System
Showing the wallet transaction history

Check Wallet by Code

Shortcode[cm_check_wallet]

Description: Shortcode shows a form, where user enters the wallet code/name, and displays wallet info.

Checking the wallet data by its ID / name - Points and Rewards Plugin
Checking the wallet data by its ID / name

Show User Balance

Shortcode[cm_user_balance]

Description: Show how many points logged-in user has on his wallet.

Displaying the wallet balance - WordPress User Wallet Credit System
Displaying the wallet balance

Show User Balance Value

Shortcode[cm_user_balance_value]

Description: Show how many the points logged user has on his wallet are worth.

Displaying the wallet balance value - WordPress MicroPayments
Displaying the wallet balance value

2) Transfer and Payment Shortcodes

Show "Purchase More Points" Link

Shortcode[cm_micropayment_buy_more_link]

Description: Displays the link to the page allowing to buy more points (checkout).

Link to purchase more points - WordPress Wallet Plugin
Link to purchase more points

Transfer Points Between Users

Shortcode[transfer_wallet_points]

Description: Shows the form which allows to make a transfer of points from your own wallet to the other wallet with the known code. Of course only the amount of points lower or equal to the amount of points available on the wallet can be sent.

For more information, read the guide WordPress MicroPayments (CMMP) - Transfer Points Between Users

Tip Button

Shortcode[cmmp_tip_button]

Description: Shows a button which allows to transfer tip to a selected user.

Attributes:

  • tipamount - Amount of the tip (default: 0)
  • account - The user_login of the WordPress user that will receive the tip (default: empty)
  • class - CSS class, if applicable (default: empty)
  • text - Plain text shown above the button (default: empty)
  • label - Button label (default:Pay Tip)

Example:

[cmmp_tip_button tipamount="5" account="johndoe" label="Pay Tip" text="Would you like to tip John Doe with 5 points?"]

Tipping 5 points to another user - WordPress Point System
Tipping 5 points to another user

PayPal Payout Exchange form

Shortcode[cm_micropayment_points_to_paypal]

Description: Displays the form allowing to exchange the points to money using PayPal Payout system.

Stripe Exchange form

Shortcode: [cm_micropayment_points_to_stripe]

Description: Displays the form allowing to exchange the points to money using the Stripe system.

Attribute: 

  • connectbutton (optional) - "1" includes link so users can connect with Stripe. "0" does not include it (default: "0") Example:  [cm_micropayment_points_to_stripe connectbutton="1"]

3) Checkout Shortcodes

Checkout Page

Shortcode[cm_micropayment_checkout]

Description: The shortcode allows to display the form allowing to buy the defined points sets using the built in PayPal Gateway. If the Easy Digital Downloads integration is enabled, the items will be added to EDD cart.

Below: Option to buy 25 points for 5 USD. After clicking on the "Send" button the payment process starts. 

MicroPayments checkout form - Points and Rewards Plugin
MicroPayments checkout form

Show Wallet Balance After Checkout

Shortcode: [get_transaction_wallet_points]

Description: Shows on the success page how many points the wallet has after completing a successful checkout.

Showing a wallet balance after checkout - WordPress User Wallet Credit System
Showing a wallet balance after checkout

Show Wallet Name After Checkout

Shortcode: [get_transaction_wallet]

Description: Shows on success page name of charged wallet.


4) Discount Shortcodes

Show Discounts

Shortcode: [cm_micropayment_points_discounts]

Description: Displays the list of the discount codes generated with the cm_micropayment_points_to_discount.

Displaying the list of generated discounts to the user - WordPress MicroPayments
Displaying the list of generated discounts to the user

Exchange Points to Discounts

Shortcode: [cm_micropayment_points_to_discount]

Description: Allows users to exchange their points to Easy Digital Downloads discount codes.

Changing points to discount - WordPress Wallet Plugin
Changing points to discount

5) Admin/Editor Management Shortcodes

Creating Wallets

Note: this shortcode was introduced in version 2.1.0.

Shortcode: [create_wallet]

Description: Allows users with the roles Administrator and Editor to create wallets for non-registered users on the front-end. The wallet can be created by entering new Wallet Nickname

Admin front-end form for creating new wallets - WordPress Point System
Admin front-end form for creating new wallets

Getting Data About Wallets

Note: this shortcode was introduced in version 2.1.0.

Shortcode: [get_wallet_data]

Description: Allows users with the roles Administrator and Editor to get information about users' wallets balance and transactions history on the front-end. It also allows adding and subtracting points from users' wallets. Adding points can be done using a positive number, subtracting - with negative number. The wallet information can be reached by its Wallet ID or Wallet Nickname

Attributes

  • balance - Shows the balance of the chosen wallet (default value is "1")
  • transactions - Shows the transactions history of the chosen wallet (default wallet is "0")
  • managepoints - Show the form for adding/subtracting points from the chosen wallet. The form opens on the click (default value is "0")
  • capability - Here we can set capability of user. Default value is "publish_posts". This parameter can be used to set, which users are allowed to get wallet data. For example, if we pass the value capability "edit_users" to the parameter, it means that only the users with that capability will be able to get wallet data. This way you can allow using this feature not only to users with the roles Administrator and EditorNote: this parameter was introduced in version 2.1.3. Learn more about Roles and Capabilities.

Example: [get_wallet_data balance="1" transactions="1" managepoints="1" capability="read"]

Admin for getting data and managing wallets - Points and Rewards Plugin
Admin for getting data and managing wallets

Managing Wallets

Note: this shortcode was introduced in version 2.1.0.

Shortcode: [manage_wallet_points]

Description: Allows users with the roles Administrator and Editor to add and subtract points from users' wallets. Adding points can be done using positive number, subtracting - using negative number. The form also has a field Comment for adding a note to this transaction.

Admin for managing wallets - WordPress User Wallet Credit System
Admin for managing wallets

More information about the WordPress MicroPayments plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.