Progress Bar Shortcode

If you want to display a progress bar, use the following shortcode:

[wcdp_progress id="123" style="2"]

The donation progress bar relies on WooCommerce Analytics to calculate and display donation data. If WooCommerce Analytics is disabled, the progress bar will not function correctly. Please make sure to activate WooCommerce Analytics.

Parameters

All parameters except id are optional.

Parametervaluedetails
id (required)Product IDProduct ID of the WooCommerce Product the donation form should use
style1 (default)
2
3
4
5
6
7
8
9
Style of the progress bar (see below)
1-4: different styles of progress bars
5: just time to go
6: just goal
7: just amount collected
8: goal + amount collected
9: just amount collected
goalfundraising goalThe amount you would like to collect with the fundraiser
cheatPositive or negative numberThis amount will be added to the donations already collected. This allows you to include external donations, for example.
addidsProduct ID(s)
separate multiple IDs with a comma (e.g. 195,209,234)
Show the combined donation barometer for multiple products

Progress Bar Styles Demo

Examples

[wcdp_progress id="1234"][wcdp_progress id="1234" addids="222,333,444"][wcdp_progress id="1234" goal="1000" cheat="230"][wcdp_progress id="1234" style="3"]

Calculation of the Sum

Calculating the sum of donations is actually quite resource intensive especially on busy sites. Donation Platform for WooCommerce therefore uses some strategies to improve performance. First of all, the amount is only calculated once an order changes its status to/from completed. In order to further reduce the load on the server (or more precisely the database) during peak loads, this calculation is performed at most once every 30s. To clean up any inconsistencies, the amount is also recalculated every 6h.
So if the amount is not updated directly, the problem should resolve itself within 6h (or if a new donation is processed in the meantime).
If you use a caching plugin (e.g. WP Super Cache or W3 Total Cache), the page itself may also be cached.