WordPress MicroPayments (CMMP) - Shortcodes - Wallet Management, Transfer, Checkout, Discount
WordPress MicroPayments Shortcodes
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:
- Wallet Management Shortcodes
- Transfer and Payment Shortcodes
- Checkout Shortcodes
- Discount Shortcodes
- Admin/Editor Management Shortcodes
- Goal System 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.
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.
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.
Check Wallet by Code
Shortcode: [cm_check_wallet]
Description: Shortcode shows a form, where user enters the wallet code/name, and displays wallet info.
Show User Balance
Shortcode: [cm_user_balance]
Description: Show how many points logged-in user has on his wallet.
Show User Balance Value
Shortcode: [cm_user_balance_value]
Description: Show how many the points logged user has on his wallet are worth.
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).
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?"]
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.
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.
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.
Exchange Points to Discounts
Shortcode: [cm_micropayment_points_to_discount]
Description: Allows users to exchange their points to Easy Digital Downloads discount codes.
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.
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 Editor. Note: 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"]
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.
6) Goal System Shortcodes
Managing Fundraising Goals
Note: this shortcode was introduced in version 2.3.6. Learn more about the goal system in this use case guide: WordPress MicroPayments (CMMP) - Use Case - How to Set Up Fundraising Goals and Collect Donations
Shortcode: [cmmp_manage_goals]
Description: This shortcode allows to display a user dashboard where he can create, edit and delete fundraising campaigns to collect donations. This shortcode has one parameter capability which allows to define which user roles with a specific user capability are able to access the dashboard. Learn more about Roles and Capabilities.
Displaying Fundraising Goals
Note: this shortcode was introduced in version 2.3.6. Learn more about the goal system in this use case guide: WordPress MicroPayments (CMMP) - Use Case - How to Set Up Fundraising Goals and Collect Donations
Shortcode: [cmmp_display_goals]
Description: This shortcode allows to display fundraising goals on the front-end, where other users can donate points to the fundraising campaign owner. By default, this shortcode displays goals of all users. It also has a parameter userid which allows to display goals only of a certain user. This parameter accepts the user ID as a value. Example: [cmmp_display_goals userid="1"]
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 |