URL Parameters

The Donation Platform for Woocommerce plugin comes with different URL parameters you can use to enhance and customize the user journey.

GET/POST Parameters

You can use these parameters either in a post/get request. This makes it easy to just share a link to custom donation forms.
To better understand how the different parameters work, it is recommended to use Style 4 and understand the parameters that are sent when you are redirected to the checkout.

GET/POST ParameterUsage
Specify a project on checkout page
Specify the pre-selected donation amount
If you use a the “button/radio selection” layout for your amount suggestion you should also set donation-amount

Hash Propertys

Hash PropertyUsage
#wcdp-formOpens the modal for popup donation forms
#wcdpScroll to the beginning of the Donation Form

Custom Attributes for Variable Products

You can preselect options of variable products: attribute_xxx

Attention: exclusively for very advanced users! Custom Attributes refers to attributes of variable products. Please take a look at the post request that is used in style 4. It is then relatively easy to see which values can be used here.

You create a variable product with the custom meta “Project” and the values “Conservation” or “Planting”, so that supporters can choose which project they want to support: https://wcdp.jonh.eu/projects/variable-product-attribute-demo/

You can now preselect the buttons with the following URL parameters:
If any other parameter is used, it is simply ignored.