This article explains how to handle WooCommerce donations. With the free plugin you will give your website visitors the option to enter a donation amount. Please see the guide on how to add a donation to your WooCommerce website. Add product to cart with Custom Price
Installing a free plugin
Get started by installing a free plugin from the WordPress plugin repository:
Go to Plugins -> Add New and enter the plugin name: Custom Price. Install and activate the plugin. Ready? Now add a new product.
Adding a product - donation
We will use standard WooCommerce functionalities based on the purchase of the product for donations. The donation will actually be a regular WooCommerce product. However, we will give it specific parameters, thanks to the capabilities of the Custom Price plugin.
Please follow the steps below:
1. Add a donation - New product
As mentioned, the donation system will be based on the standard WooCommerce product. Start by adding a new product:
Fill in its basic data, such as title, description, category, product image. Of course you will be able to come back to them later ;)
2. Make the product Virtual
In this case, the donation will be made online and will not ship any physical items. To disable shipping for this product, select the Virtual checkbox:
As a result, shipping methods will not be calculated when purchasing this product.
3. Enable your own price for donating in WooCommerce
To disable the default WooCommerce price fields, check the Turn on custom price checkbox. This field is added by our plugin.
The effect of this change is to replace the "fixed" amount entered by the store administrator with the input field. The buyer (donor) will be able to enter their own amount in this field.
4. Specify a name for the donation field
On the product page, above the input type field, you can add your own text. It is a good practice to introduce donor instructions here. So that he knows what step he should take. For example: Enter donation amount:
5. Sell individually
To make the process as simple as possible for the buyer (donor), turn off the number of products input field on the product page. In this scenario, you won't need it. Go to the Inventory section and check the box Sold individually:
Thanks to this, there will be no additional distractions on the product page. Most themes will only display a price input field and an Add to Cart button.
After publishing the product, visitors to your WooCommerce store will have the option to enter their own amount to donate:
Selection from the list of default amounts - custom price
By using the variations functionality, you can give the donors a choice of the amount to pay without purging them of the possibility of entering their own donation amount. To provide this flexibility, please follow the steps below.
- Set the product type to Variable product:
2. Add an Amount attribute and enter values, e.g. as in the screenshot
3. Create product variations and fill in the amounts
4.For the last variation on the list, select the Custom Price checkbox:
5. The buyer / donor will be able to select an amount from the list or enter its own in the field that will appear after selecting the option:
Advanced WooCommerce Donations
In this tutorial, I have only introduced the basic features of the WooCommerce Custom Price plugin. In the PRO version of the plugin, you can implement many more scenarios, e.g:
- you will create recurring donations with automatic payment every month thanks to integration with WooCommerce Subscriptions
- you will set a minimum donation value
- you will set the maximum value of the donation
- you enter the suggested donation amount:
Additionally, in PRO you have the possibility to easily change the phrases displayed to buyers. Thanks to this, you can better adapt the plugin to your needs:
Custom Price for WooCommerce PRO £49
Allow customers to name product prices in WooCommerce. And use it for donations or marketing campaigns!Add to cart or View Details