The Number of patrons / Income block and shortcode display a counter of your patrons and/or your income of a period.
Block options
(Coming soon)
Shortcode options
You can use the [patronstips_period_results] shortcode to display your number of patrons and/or income.
| Attribute | Expected value |
|---|---|
| display | The data to display: both, patron_nb, income. Default: patron_nb. |
| zero_text | A custom text that will be displayed instead of “0”. |
| raw | Set it to 1 to display the unformatted number. Default: 0. |
| include_tax | Set it to 1 to include tax in total income. The “display” parameter must be income or both. Default: 1. |
| include_discounts | Set it to 1 to deduce discounts from total income. The “display” parameter must be income or both. Default: 0. |
| include_scheduled | Set it to 1 to include scheduled recurring payments to total income, even if you have not captured them yet. The “display” parameter must be income or both. Default: 1. |
| include_manual | Set it to 1 to include patronage entries added manually. The “display” parameter must be income or both. Default: 0. |
| decimals | The number of decimals to display the total income (integer). The “display” parameter must be income or both. Default: 0 / WooCommerce settings. |
Shortcode examples
Display the total income of your patronage.
[patronstips_period_results display="income"]
Display the unformatted number of current patrons (i.e. it will display “15” instead of “15 patrons”). Please note that the result still contains HTML (see next paragraph)
[patronstips_period_results raw="1"]
Display a counter without any HTML
[patronstips_period_results] displays encapsulated content. To avoid this and get the raw numbers without any HTML, you can use:
[patronstips_patron_number raw="1"]for number of patrons[patronstips_period_income raw="1"]for income
