i4w_list_ccards
Usage
This shortcode produces a list of credit cards on file belonging to the current, logged in, subscriber to your site.
Through various parameters, you can specify the order of display, filter cards based on known validity, determine the headers for the table listing, whether you want to allow the card to be edited and on which page or URL they should be edited.
Every display aspect is governed by CSS, which you may override as part of the shortcode call.
[ELSE_list_ccards] conditional branching is NOT supported.
Shortcode nesting is NOT supported.
Parameters
| Parameter | Description | Default | Required |
|---|---|---|---|
| status | Filter the list based on valid status. Can be 'all', 'valid' or 'invalid'. Only the first character is needed. | all | No |
| headers | Column headers for the generated table. | Name on Card,Card,Last 4,Expiration,Status | No |
| sort | Order of display, 'asc' for ascending and 'desc' for descending, based on the date the card(s) were added to the database. | asc | No |
| allowedit | Whether an edit link is added to the table. | true | No |
| editurl | The page/post on which the edit is to take place. Automatically passes a URL GET parameter of 'ccid' with the selected credit card's ID. | current page/post | No |
Example
[i4w_list_ccards]
[i4w_list_ccards status='valid']
[i4w_list_ccards sort='desc']
[i4w_list_ccards allowedit='true' editurl='http://myapp.infusionsoft.com/nhywaty']
Notes
In order to fully enable credit card editing, the page upon which the card should be edited must contain the [i4w_ccard_update] shortcode.
In its simplest form, the following shortcode combination will produce a page with a list of editable cards and the appropriate HTML form to edit each card:
[i4w_ifget get='ccid'][i4w_ccard_update][/i4w_ifget][i4w_list_ccards]
Since the shortcode may be used multiple times on a single page/post to represent different views, the CSS elements' ID's will be automatically randomized for each instance.