Donation Platform for WooCommerce offers a shortcode so you can display the donation form anywhere you want:
[wcdp_donation_form id="123"]
Parameters
Parameter | value | details |
---|---|---|
id (required) | Product ID | Product ID of the WooCommerce Product the donation form should use |
style | 1 (default) 2 3 4 5 | Style of the donation form. Style 1: each step in a tab with a header (Demo) Style 2: all steps on one page (Demo) style 3: each step in a tab (Demo) style 4: just first step, redirects to checkout page (Demo) style 5: banner header (Demo) |
popup | 0 (default) 1 | if 1, the donation form will be displayed in a lightbox (Demo) If you want to add additional triggers for the popup you can just add links with the target href="#wcdp-form" to open the lightbox |
button | 0 1 (default) | Only has an effect if popup=1 If button=0 it will not display a button to open the lightbox. Instead you can use custom links with href="#wcdp-form" to open the lightbox |
image | 0 (default) 1 | if 1, display the product image (Demo) |
title | 0 (default) 1 | if 1, display product title |
description | 0 (default) 1 | if 1, display the product description |
short_description | 0 (default) 1 | if 1, display the product short description |
label | string default: “Donate now!” | set the label of the button that opens the popup |
className | class name(s) | Add additional classes to the donation form, separate different classes with a space. |
Examples
[wcdp_donation_form id="1234"]
[wcdp_donation_form id="1234" style="2"]
[wcdp_donation_form id="1234" style="3" popup="1" button="1" label="I want to contribute"]
[wcdp_donation_form id="1234" style="4" popup="1" button="0"]
[ wcdp_donation_form id="1234" popup="1" title="1" short_description="1"]
[ wcdp_donation_form id="1234" popup="1" description="1" image="1"]