WooCommerce is a great shopping cart, but it doesn’t do much without buying plugins to extend it’s basic functions. For example, there’s no way to Create a Donation Page with WooCommerce.
If you are a non-profit organization and want to collect donations of any amount, there’s no way to do it. Sure, you can create a variable product with predefined donation options; eg, $10, $20, $50, $100. But what if you want the user to be able to enter ANY amount?
With the Product Add-ons Extension, you can Create a Donation Page with WooCommerce.
Create a Donation Page With WooCommerce
IMPORTANT: This procedure assumes you already have WooCommerce installed and configured to sell products; eg, you have payment gateway such as PayPal or Authorize.net
Install Product Add-Ons
Buy and install the WooCommerce extension Product Add-Ons. It’s $49 for the extension, but WooCommerce is free, so not a bad deal. How to install WordPress plugins.
Create a new product called Donations
- Go to Products and click Add Product.
WooCommerce displays the Edit Product screen. - Enter a title of Donations.
- Enter some descriptive text.
- Product Categories: If you don’t want to see related products below the donation product, don’t add the donations product to a category.
- From the Product Data menu, click General.
- Select Simple Product.
- Check Virtual.
- In the Regular price field, enter 00.00
- From the Tax Status field, select None.
- From the Product Data menu, click Advanced.
- Uncheck Enable Reviews. Most likely, you don’t want reviews on a donation page.
- Under Inventory check Sold Individually. This removes the number field next to the product.
- From the Product Data menu, click Add-Ons
- Click New Addon Group
- From the Group list, select Custom Price.
- Check Required fields
- If you have a minimum or maximum donation amount, enter in it the Min or Max field.
- Check Global Addon Exclusion. The option excludes any global Product Add0ons you created for other products.
- Click Set Featured image to add a product image for donations. If you don’t specify a featured image, WooCommerce will use the default product image.
- Click Publish and review the donation product.
Notice that the Donate product shows “Free!” on the single product page and on the category page.
- To remove the Free! text from the category and single product page, add the following code at the end of your functions.php file:
/** * Hide the 'Free!' price notice */ add_filter( 'woocommerce_variable_free_price_html', 'hide_free_price_notice' ); add_filter( 'woocommerce_free_price_html', 'hide_free_price_notice' ); add_filter( 'woocommerce_variation_free_price_html', 'hide_free_price_notice' ); function hide_free_price_notice( $price ) { return ''; }
- That’s it. You now have a donation page. Make sure you create a test donation to make sure everything works.
Leave a Reply