Advanced Shortcodes
Advanced Shortcodes

More information about shortcodes in WordPress documentation https://wordpress.com/support/wordpress-editor/blocks/shortcode-block

Find back all details in the plugin itself.

WordPress Admin
Payouts
Appearance
Shortcodes

Unitary information

Sometime you want to display pieces of information to your customer on your own way. This shortcode is done for you. It does not provide any layout or decoration but only singular values about withdrawals.

Instead of providing an infinite list of individual shortcodes, you select the piece of information to display with the attributes: field, filter, status… Do not worry about performance in case you display several values about the same request. We manage some cache to do not query the database for every single shortcode instance.

We recommend you to look at the plugin embedded documentation for explanations of the whole possibilities.

[lws_withdraw_field field="total" filter="sum" status="completed"]

In the example above, we want to show the total amount ever paid to the customer.

Take care about the source attribute. The source is pre-filled in the plugin inline documentation and you can just copy/past. Visit the Payout → Connections page for more information.

Conditional bloc

With this shortcode, you can hide a part of your content unless the current customer fulfill a bunch of conditions. Conditions could be about available credit, pending requests, role, etc.

There is a lot of condition available to test if the content must be displayed or not. We recommend you to look at the plugin embedded documentation for explanations of the whole possibilities.


Note this is a enclosing shortcode. It means you will write content inside a pair of tags. To use it with blocks edition, you need to wrap them around, with the opening tag in a first shortcode block and closing tag in a second shortcode block.

Here is an example asking for your user to register an account if he does not have it done yet:

[lws_withdraw_conditional has_account="no"]Please, register an account if you intend to request a withdrawal[/lws_withdraw_conditional]

Take care about the source attribute. The source is pre-filled in the plugin inline documentation and you can just copy/past. Visit the Payout → Connections page for more information.

Note that you can other shortcodes inside this one (like the unitary information shortcode) but put another lws_withdraw_conditional inside a lws_withdraw_conditional is not well recognized due to WordPress implementation.

Was this article helpful?
Dislike 0
Views: 25

Continue reading

Previous: Withdrawal Settings