When using Donation Platform for WooCommerce, the donation amount field is automatically prefilled based on the product price. This behavior ensures a seamless experience but can be disabled with a simple workaround if you prefer to have no preselected amount.
TL;DR
To remove the preselected donation amount, set the default product price to a value outside of the allowed donation range (e.g., set it to 0.01
when the minimum donation amount is 1
). This ensures no amount is automatically selected when the form is loaded.
How It Works
- For simple products, the product price is used to prefill the donation form.
- For variable products, the price of the cheapest variation is used as the default donation amount.
This default value is only applied if it falls within the configured minimum and maximum donation limits.
How to Disable the Preselected Amount
If you don’t want any amount to be prefilled, you can set the product’s default price to a value that’s outside the allowed range.
Example
If your donation settings specify:
Minimum donation amount: 1
Maximum donation amount: 500
–> You can set your product price to: 0.50 or 501
This value is below/above the minimum/maximum donation amount, so the form will not preselect it. The user will need to manually enter a valid donation amount.
Important Notes
- WooCommerce requires every product to have a price. Setting it to a low value like
0.01
fulfills this requirement while effectively disabling the default selection. - If your donation form still shows a value, double-check the min/max settings under the donation configuration and ensure the product price is indeed outside the range.