1. Documentation /
  2. Donation for WooCommerce - Developer Documentation

Donation for WooCommerce – Developer Documentation

API Parameter Structure 

↑ Back to top
ParamsTypeRequiredValuesDescription
titlestringyesUser defined value
status stringyespublish, trashWork for the PUT method only.
_thumbnail_idintnoattachment idYou will find attachment id in media library
wc-donation-disp-single-pagestringnoyes, noDefault value is no
wc-donation-disp-shop-pagestringnoyes, noDefault is no
wc-donation-amount-display-optionstringyespredefined, free-value, bothDefault is both
pred-amountArray of int or floatYes (if amount type is predefined or both) else noUser defined array with sets of amount without currency symbol
(ex. [‘10’,’20’,’25.5’…])
Pass value without a currency symbol.
pred-labelArray of stringYes (if amount type is predefined or both) else noUser defined array with sets of labels stringThe size or array should be the same as pred-amount, if you want to leave any label then pass only double quote in array “”
free-min-amountInt or floatYes (if amount type is free-value or both) else noUser defined valueDefault is empty
free-max-amountInt or floatYes (if amount type is free-value or both) else noUser defined valueDefault is empty
wc-donation-display-donation-typestringnoselect, radio, labelDefault value is select
wc-donation-currency-positionstringnobefore, afterDefault is before
wc-donation-titlestringnoUser defined valueDefault is empty
wc-donation-button-textstringnoUser defined valueDefault is donate
wc-donation-button-text-colorcolornoHexcode of color without #FFFFFF
wc-donation-button-bg-colorcolornoHexcode of color without #333333
wc-donation-recurringstringnoenabled, disabled, userDefault is disabled
If user then do not pass interval , period & length param
_subscription_period_intervalintYes (if recurring is enabled) else No1 to 6If wrong value pass then 1 will be selected
_subscription_periodstringYes (if recurring is enabled) else Noday, month, year, week
_subscription_lengthintYes (if recurring is enabled) else No0 to 24 for month, 0 to 90 for day,0 to 52 for week, 0 to 5 for year0 used for
 “never expired”
wc-donation-recurring-txtstringYes (if recurring is user) else NoUser defined value
wc-donation-goal-display-optionstringnoenabled, disabledDefault is disabled
wc-donation-goal-display-typestringYes (if donation goal is enabled) else Nofixed_amount , percentage_amount, no_of_donation, no_of_daysDefault is fixed_amount
wc-donation-goal-fixed-amount-fieldInt of floatYes (if goal type is fixed_amount or percentage_amount) else NoUser defined valuepass number without currency symbol
wc-donation-goal-fixed-initial-amount-fieldInt or floatnoUser defined valuepass number without currency symbol, This will work only if wc-donation-goal-display-type is fixed_amount or percentage_amount
wc-donation-goal-no-of-donation-fieldintYes (if goal type is no_of_donation) else NoUser defined valueDefault is empty
wc-donation-goal-no-of-days-fielddateYes (if goal type is no_of_days) else Nodate
dd-mm-yy25-Aug-2022
yy-mm-dd2022-1-15
Without “0” in mm
wc-donation-goal-progress-bar-colorcolornoHexcode of color without #333333
wc-donation-goal-display-donor-countstringnoenabled, disabledDefault is disabled
wc-donation-goal-close-formstringnoenabled, disabledDefault is disabled
wc-donation-goal-close-form-textstringnoUser defined textDefault is empty
wc-donation-progress-on-shopstringnoenabled, disabledDefault is disabled
wc-donation-progress-on-widgetstringnoenabled, disabledDefault is disabled
wc-donation-cause-display-optionstringnoshow,hideDefault is hide
donation-cause-imgArray of stringnoImage full url in arrayDefault is none
donation-cause-nameArray of stringYes, if donation cause image array is passed else no.User defined text in arrayDefault is empty
donation-cause-descArray of stringYes, if donation cause image array is passed else no.User defined text in arrayDefault is empty
tributesArray of stringsnoUser defined text in arrayDefault is empty

REST API

↑ Back to top

To access the Donation REST API routes, you will first need to enable the WC Donation API from WC Donation > General Settings

In Donation REST API you will be able to CREATE Campaign (POST) , UPDATE Campaign (PUT) , DELETE Campaign, GET all campaigns and GET specific campaigns.

API Test

↑ Back to top

Making a basic request

The request URL we’ll test is wp-json/wc-donation/v1/campaign. On localhost the full URL may look something like this: http://dev.wordpress.local/wp-json/wc-donation/v1/campaign. Modify this to use your own site URL.

In Postman, you need to set the fields for request type, request URL, and the settings on the authorization tab. For Authorization, choose basic auth and enter your admin email and Application password from the wordpress user profile

Once you’re done, hit send, and you’ll see the JSON response from the API if everything went well. The response should look like this:

Create Campaign

↑ Back to top

DESCRIPTION

↑ Back to top

Creates a Donation Campaign with the given parameters from the request body, after created the first object is campaign id, through campaign id you can update , delete and get specific campaign

REQUEST URL & Method  

↑ Back to top

POST

wp-json/wc-donation/v1/campaign/

Content-Type: application/json

REQUEST BODY Example

↑ Back to top

{

    “title”: “A Campaign by API”,

    “_thumbnail_id”: 3341,

    “wc-donation-disp-single-page”: “yes”,

    “wc-donation-disp-shop-page”: “yes”,

    “wc-donation-amount-display-option”: “both”,

    “pred-amount”: [“10.25”, “20.25”, “30.25”],

    “pred-label”: [“label1”, “label2”, “label3”],

    “free-min-amount”: “10.25”,

    “free-max-amount”: “30.25”,

    “wc-donation-display-donation-type”: “radio”,

    “wc-donation-currency-position”: “after”,

    “wc-donation-title”: “Help for the cause”,

    “wc-donation-button-text”: “Donate Us”,

    “wc-donation-button-text-color”: “00ff00”,

    “wc-donation-button-bg-color”: “2e6057”,

    “wc-donation-recurring”: “enabled”,

    “_subscription_period_interval”: 1,

    “_subscription_period”: “month”,

    “_subscription_length”: 3,

    “wc-donation-goal-display-option”: “enabled”,

    “wc-donation-goal-display-type”: “percentage_amount”,

    “wc-donation-goal-fixed-amount-field”: 12000,

    “wc-donation-goal-fixed-initial-amount-field”: 1250,

    “wc-donation-goal-progress-bar-color”: “FF0000”,

    “wc-donation-goal-display-donor-count”: “enabled”,

    “wc-donation-goal-close-form”: “enabled”,

    “wc-donation-goal-close-form-text”: “goal is ended now”,

    “wc-donation-progress-on-shop”: “enabled”,

    “wc-donation-progress-on-widget”: “enabled”,

    “wc-donation-cause-display-option”: “show”,

    “donation-cause-img”: [“https://woocommerce-224605-1524250.cloudwaysapps.com/wp-content/uploads/2022/02/chai-tea.svg”, “https://woocommerce-224605-1524250.cloudwaysapps.com/wp-content/uploads/2022/02/chicken.svg”],

    “donation-cause-name”: [“cause 1”, “cause 2”],

    “donation-cause-desc”: [“desc 1”, “desc 2”],

    “tributes”: [“In the Honor of Donation Plugin”, “In the Honor of Restaurant Plugin”, “In the Honor of Objects”]

}

RESPONSE EXAMPLE

↑ Back to top

    {

    “ID”: 74,

    “post_author”: “1”,

    “post_date”: “2022-08-18 17:03:35”,

    “post_date_gmt”: “2022-08-18 12:03:35”,

    “post_content”: “”,

    “post_title”: “A Campaign by API”,

    “post_excerpt”: “”,

    “post_status”: “publish”,

    “comment_status”: “closed”,

    “ping_status”: “closed”,

    “post_password”: “”,

    “post_name”: “a-campaign-by-api”,

    “to_ping”: “”,

    “pinged”: “”,

    “post_modified”: “2022-08-18 17:03:35”,

    “post_modified_gmt”: “2022-08-18 12:03:35”,

    “post_content_filtered”: “”,

    “post_parent”: 0,

    “guid”: “https://woocommerce-224605-1524250.cloudwaysapps.com/wc-donation/a-campaign-by-api/”,

    “menu_order”: 0,

    “post_type”: “wc-donation”,

    “post_mime_type”: “”,

    “comment_count”: “0”,

    “filter”: “raw”,

    “campaign_meta”: {

        “_thumbnail_id”: [

            “3341”

        ],

        “wc-donation-tablink”: [

            “tab-1”

        ],

        “wc-donation-disp-single-page”: [

            “yes”

        ],

        “wc-donation-disp-shop-page”: [

            “yes”

        ],

        “wc-donation-amount-display-option”: [

            “both”

        ],

        “pred-amount”: [

            “a:3:{i:0;s:5:\”10.25\”;i:1;s:5:\”20.25\”;i:2;s:5:\”30.25\”;}”

        ],

        “pred-label”: [

            “a:3:{i:0;s:6:\”label1\”;i:1;s:6:\”label2\”;i:2;s:6:\”label3\”;}”

        ],

        “free-min-amount”: [

            “10.25”

        ],

        “free-max-amount”: [

            “30.25”

        ],

        “wc-donation-display-donation-type”: [

            “radio”

        ],

        “wc-donation-currency-position”: [

            “after”

        ],

        “wc-donation-title”: [

            “Help for the cause”

        ],

        “wc-donation-button-text”: [

            “Donate Us”

        ],

        “wc-donation-button-text-color”: [

            “00ff00”

        ],

        “wc-donation-button-bg-color”: [

            “2e6057”

        ],

        “wc-donation-recurring”: [

            “enabled”

        ],

        “_subscription_period_interval”: [

            “1”

        ],

        “_subscription_period”: [

            “month”

        ],

        “_subscription_length”: [

            “3”

        ],

        “wc-donation-goal-display-option”: [

            “enabled”

        ],

        “wc-donation-goal-display-type”: [

            “percentage_amount”

        ],

        “wc-donation-goal-fixed-amount-field”: [

            “12000”

        ],

        “wc-donation-goal-fixed-initial-amount-field”: [

            “1250”

        ],

        “wc-donation-goal-no-of-donation-field”: [

            “”

        ],

        “wc-donation-goal-no-of-days-field”: [

            “”

        ],

        “wc-donation-goal-total-days”: [

            “0”

        ],

        “wc-donation-goal-progress-bar-color”: [

            “FF0000”

        ],

        “wc-donation-goal-display-donor-count”: [

            “enabled”

        ],

        “wc-donation-goal-close-form”: [

            “enabled”

        ],

        “wc-donation-goal-close-form-text”: [

            “goal is ended now”

        ],

        “wc-donation-progress-on-shop”: [

            “enabled”

        ],

        “wc-donation-progress-on-widget”: [

            “enabled”

        ],

        “wc-donation-cause-display-option”: [

            “show”

        ],

        “donation-cause-names”: [

            “a:2:{i:0;s:7:\”cause 1\”;i:1;s:7:\”cause 2\”;}”

        ],

        “donation-cause-desc”: [

            “a:2:{i:0;s:6:\”desc 1\”;i:1;s:6:\”desc 2\”;}”

        ],

        “donation-cause-img”: [

            “a:2:{i:0;s:92:\”https://woocommerce-224605-1524250.cloudwaysapps.com/wp-content/uploads/2022/02/chai-tea.svg\”;i:1;s:91:\”https://woocommerce-224605-1524250.cloudwaysapps.com/wp-content/uploads/2022/02/chicken.svg\”;}”

        ],

        “tributes”: [

            “a:3:{i:0;s:31:\”In the Honor of Donation Plugin\”;i:1;s:33:\”In the Honor of Restaurant Plugin\”;i:2;s:23:\”In the Honor of Objects\”;}”

        ],

        “wc_donation_product”: [

            “3437”

        ],

        “wc-donation-recurring-txt”: [

            “Please make it recurring donation”

        ],

        “inline_featured_image”: [

            “0”

        ],

        “total_donors”: [

            “”

        ],

        “total_donations”: [

            “”

        ],

        “total_donation_amount”: [

            “”

        ]

    }

}

Update Campaign

↑ Back to top

DESCRIPTION

↑ Back to top

Update the WC Donation campaign by campaign id. The request will not update key values that aren’t present in the request body; it will remain the same as it was before, however if they are present their value will be updated. The request will return the updated Campaign data object. 

REQUEST URL & Method  

↑ Back to top

PUT

wp-json/wc-donation/v1/campaign/ {Campaign_id}

Content-Type: application/json

REQUEST BODY Example

↑ Back to top

{

     “wc-donation-amount-display-option”: “free-value”,

    “free-min-amount”: “1”,

    “free-max-amount”: “5000”,

    “wc-donation-display-donation-type”: “select”,

     “wc-donation-recurring”: “enabled”,

    “_subscription_period_interval”: 6,

    “_subscription_period”: “week”,

    “_subscription_length”: 52

}

RESPONSE EXAMPLE

↑ Back to top

{

    “ID”: 74,

    “post_author”: “1”,

    “post_date”: “2022-09-06 13:49:27”,

    “post_date_gmt”: “2022-09-06 13:49:27”,

    “post_content”: “”,

    “post_title”: “A Campaign by API”,

    “post_excerpt”: “”,

    “post_status”: “publish”,

    “comment_status”: “closed”,

    “ping_status”: “closed”,

    “post_password”: “”,

    “post_name”: “a-campaign-by-api-2”,

    “to_ping”: “”,

    “pinged”: “”,

    “post_modified”: “2022-09-06 13:49:27”,

    “post_modified_gmt”: “2022-09-06 13:49:27”,

    “post_content_filtered”: “”,

    “post_parent”: 0,

    “guid”: “http://wpexperts.local/wc-donation/a-campaign-by-api-2/”,

    “menu_order”: 0,

    “post_type”: “wc-donation”,

    “post_mime_type”: “”,

    “comment_count”: “0”,

    “filter”: “raw”,

    “campaign_meta”: {

        “_thumbnail_id”: [

            “3341”

        ],

        “wc-donation-tablink”: [

            “tab-1”

        ],

        “wc-donation-disp-single-page”: [

            “yes”

        ],

        “wc-donation-disp-shop-page”: [

            “yes”

        ],

        “wc-donation-amount-display-option”: [

            “free-value”

        ],

        “pred-amount”: [

            “a:3:{i:0;s:5:\”10.25\”;i:1;s:5:\”20.25\”;i:2;s:5:\”30.25\”;}”

        ],

        “pred-label”: [

            “a:3:{i:0;s:6:\”label1\”;i:1;s:6:\”label2\”;i:2;s:6:\”label3\”;}”

        ],

        “free-min-amount”: [

            “1”

        ],

        “free-max-amount”: [

            “5000”

        ],

        “wc-donation-display-donation-type”: [

            “select”

        ],

        “wc-donation-currency-position”: [

            “after”

        ],

        “wc-donation-title”: [

            “Help for the cause”

        ],

        “wc-donation-button-text”: [

            “Donate Us”

        ],

        “wc-donation-button-text-color”: [

            “00ff00”

        ],

        “wc-donation-button-bg-color”: [

            “2e6057”

        ],

        “wc-donation-recurring”: [

            “enabled”

        ],

        “_subscription_period_interval”: [

            “6”

        ],

        “_subscription_period”: [

            “week”

        ],

        “_subscription_length”: [

            “52”

        ],

        “wc-donation-goal-display-option”: [

            “enabled”

        ],

        “wc-donation-goal-display-type”: [

            “percentage_amount”

        ],

        “wc-donation-goal-fixed-amount-field”: [

            “12000”

        ],

        “wc-donation-goal-fixed-initial-amount-field”: [

            “1250”

        ],

        “wc-donation-goal-no-of-donation-field”: [

            “”

        ],

        “wc-donation-goal-no-of-days-field”: [

            “”

        ],

        “wc-donation-goal-total-days”: [

            “0”

        ],

        “wc-donation-goal-progress-bar-color”: [

            “FF0000”

        ],

        “wc-donation-goal-display-donor-count”: [

            “enabled”

        ],

        “wc-donation-goal-close-form”: [

            “enabled”

        ],

        “wc-donation-goal-close-form-text”: [

            “goal is ended now”

        ],

        “wc-donation-progress-on-shop”: [

            “enabled”

        ],

        “wc-donation-progress-on-widget”: [

            “enabled”

        ],

        “wc-donation-cause-display-option”: [

            “show”

        ],

        “donation-cause-names”: [

            “a:2:{i:0;s:7:\”cause 1\”;i:1;s:7:\”cause 2\”;}”

        ],

        “donation-cause-desc”: [

            “a:2:{i:0;s:6:\”desc 1\”;i:1;s:6:\”desc 2\”;}”

        ],

        “donation-cause-img”: [

            “a:2:{i:0;s:92:\”https://woocommerce-224605-1524250.cloudwaysapps.com/wp-content/uploads/2022/02/chai-tea.svg\”;i:1;s:91:\”https://woocommerce-224605-1524250.cloudwaysapps.com/wp-content/uploads/2022/02/chicken.svg\”;}”

        ],

        “tributes”: [

            “a:3:{i:0;s:31:\”In the Honor of Donation Plugin\”;i:1;s:33:\”In the Honor of Restaurant Plugin\”;i:2;s:23:\”In the Honor of Objects\”;}”

        ],

        “wc_donation_product”: [

            “75”

        ],

        “total_donors”: [

            “”

        ],

        “total_donations”: [

            “”

        ],

        “total_donation_amount”: [

            “”

        ]

    }

}

Delete Campaign

↑ Back to top

DESCRIPTION

↑ Back to top

Delete Campaign by campaign id, the will stored in trash when deleted by API.

REQUEST URL & Method  

↑ Back to top

DELETE

wp-json/wc-donation/v1/campaign/ {Campaign_id}

Response Example

↑ Back to top

{

    “ID”: 51,

    “message”: “Campaign deleted successfully”

}

Get specific Campaign

↑ Back to top

DESCRIPTION

↑ Back to top

Retrieves a single or specific campaign by its ID. The response contains the Campaign data object.

REQUEST URL & Method  

↑ Back to top

GET

wp-json/wc-donation/v1/campaign/ {Campaign_id}

Response Example

↑ Back to top

{

    “ID”: 74,

    “post_author”: “1”,

    “post_date”: “2022-09-06 13:49:27”,

    “post_date_gmt”: “2022-09-06 13:49:27”,

    “post_content”: “”,

    “post_title”: “A Campaign by API”,

    “post_excerpt”: “”,

    “post_status”: “publish”,

    “comment_status”: “closed”,

    “ping_status”: “closed”,

    “post_password”: “”,

    “post_name”: “a-campaign-by-api-2”,

    “to_ping”: “”,

    “pinged”: “”,

    “post_modified”: “2022-09-06 13:49:27”,

    “post_modified_gmt”: “2022-09-06 13:49:27”,

    “post_content_filtered”: “”,

    “post_parent”: 0,

    “guid”: “http://wpexperts.local/wc-donation/a-campaign-by-api-2/”,

    “menu_order”: 0,

    “post_type”: “wc-donation”,

    “post_mime_type”: “”,

    “comment_count”: “0”,

    “filter”: “raw”,

    “campaign_meta”: {

        “_thumbnail_id”: [

            “3341”

        ],

        “wc-donation-tablink”: [

            “tab-1”

        ],

        “wc-donation-disp-single-page”: [

            “yes”

        ],

        “wc-donation-disp-shop-page”: [

            “yes”

        ],

        “wc-donation-amount-display-option”: [

            “free-value”

        ],

        “pred-amount”: [

            [

                “10.25”,

                “20.25”,

                “30.25”

            ]

        ],

        “pred-label”: [

            [

                “label1”,

                “label2”,

                “label3”

            ]

        ],

        “free-min-amount”: [

            “1”

        ],

        “free-max-amount”: [

            “5000”

        ],

        “wc-donation-display-donation-type”: [

            “select”

        ],

        “wc-donation-currency-position”: [

            “after”

        ],

        “wc-donation-title”: [

            “Help for the cause”

        ],

        “wc-donation-button-text”: [

            “Donate Us”

        ],

        “wc-donation-button-text-color”: [

            “00ff00”

        ],

        “wc-donation-button-bg-color”: [

            “2e6057”

        ],

        “wc-donation-recurring”: [

            “enabled”

        ],

        “_subscription_period_interval”: [

            “6”

        ],

        “_subscription_period”: [

            “week”

        ],

        “_subscription_length”: [

            “52”

        ],

        “wc-donation-goal-display-option”: [

            “enabled”

        ],

        “wc-donation-goal-display-type”: [

            “percentage_amount”

        ],

        “wc-donation-goal-fixed-amount-field”: [

            “12000”

        ],

        “wc-donation-goal-fixed-initial-amount-field”: [

            “1250”

        ],

        “wc-donation-goal-no-of-donation-field”: [

            “”

        ],

        “wc-donation-goal-no-of-days-field”: [

            “”

        ],

        “wc-donation-goal-total-days”: [

            “0”

        ],

        “wc-donation-goal-progress-bar-color”: [

            “FF0000”

        ],

        “wc-donation-goal-display-donor-count”: [

            “enabled”

        ],

        “wc-donation-goal-close-form”: [

            “enabled”

        ],

        “wc-donation-goal-close-form-text”: [

            “goal is ended now”

        ],

        “wc-donation-progress-on-shop”: [

            “enabled”

        ],

        “wc-donation-progress-on-widget”: [

            “enabled”

        ],

        “wc-donation-cause-display-option”: [

            “show”

        ],

        “donation-cause-names”: [

            “a:2:{i:0;s:7:\”cause 1\”;i:1;s:7:\”cause 2\”;}”

        ],

        “donation-cause-desc”: [

            “a:2:{i:0;s:6:\”desc 1\”;i:1;s:6:\”desc 2\”;}”

        ],

        “donation-cause-img”: [

            “a:2:{i:0;s:92:\”https://woocommerce-224605-1524250.cloudwaysapps.com/wp-content/uploads/2022/02/chai-tea.svg\”;i:1;s:91:\”https://woocommerce-224605-1524250.cloudwaysapps.com/wp-content/uploads/2022/02/chicken.svg\”;}”

        ],

        “tributes”: [

            “a:3:{i:0;s:31:\”In the Honor of Donation Plugin\”;i:1;s:33:\”In the Honor of Restaurant Plugin\”;i:2;s:23:\”In the Honor of Objects\”;}”

        ],

        “wc_donation_product”: [

            “75”

        ],

        “total_donors”: [

            “”

        ],

        “total_donations”: [

            “”

        ],

        “total_donation_amount”: [

            “”

        ]

    }

}

Get all Campaigns

↑ Back to top

DESCRIPTION

↑ Back to top

Retrieves all currently available campaigns. The response will contain the Campaign data object.

REQUEST URL & Method  

↑ Back to top

GET

wp-json/wc-donation/v1/campaign/ 

Response Example

↑ Back to top

[

    {

        “ID”: 76,

        “post_author”: “1”,

        “post_date”: “2022-09-06 15:17:29”,

        “post_date_gmt”: “2022-09-06 15:17:29”,

        “post_content”: “”,

        “post_title”: “Test Campaign”,

        “post_excerpt”: “”,

        “post_status”: “publish”,

        “comment_status”: “closed”,

        “ping_status”: “closed”,

        “post_password”: “”,

        “post_name”: “test-campaign”,

        “to_ping”: “”,

        “pinged”: “”,

        “post_modified”: “2022-09-06 15:17:29”,

        “post_modified_gmt”: “2022-09-06 15:17:29”,

        “post_content_filtered”: “”,

        “post_parent”: 0,

        “guid”: “http://wpexperts.local/wc-donation/test-campaign/”,

        “menu_order”: 0,

        “post_type”: “wc-donation”,

        “post_mime_type”: “”,

        “comment_count”: “0”,

        “filter”: “raw”,

        “campaign_meta”: {

            “wc-donation-tablink”: [

                “tab-1”

            ],

            “wc-donation-disp-single-page”: [

                “yes”

            ],

            “wc-donation-disp-shop-page”: [

                “yes”

            ],

            “wc-donation-amount-display-option”: [

                “free-value”

            ],

            “pred-amount”: [

                “”

            ],

            “pred-label”: [

                “”

            ],

            “free-min-amount”: [

                “1”

            ],

            “free-max-amount”: [

                “520.5”

            ],

            “wc-donation-display-donation-type”: [

                “label”

            ],

            “wc-donation-currency-position”: [

                “after”

            ],

            “wc-donation-title”: [

                “Donation box”

            ],

            “wc-donation-button-text”: [

                “Donate Us”

            ],

            “wc-donation-button-text-color”: [

                “B80DFF”

            ],

            “wc-donation-button-bg-color”: [

                “F7F7F7”

            ],

            “wc-donation-recurring”: [

                “enabled”

            ],

            “_subscription_period_interval”: [

                “6”

            ],

            “_subscription_period”: [

                “year”

            ],

            “_subscription_length”: [

                “0”

            ],

            “wc-donation-goal-display-option”: [

                “enabled”

            ],

            “wc-donation-goal-display-type”: [

                “no_of_days”

            ],

            “wc-donation-goal-fixed-amount-field”: [

                “”

            ],

            “wc-donation-goal-fixed-initial-amount-field”: [

                “”

            ],

            “wc-donation-goal-no-of-donation-field”: [

                “”

            ],

            “wc-donation-goal-no-of-days-field”: [

                “25-dec-2022”

            ],

            “wc-donation-goal-total-days”: [

                “110”

            ],

            “wc-donation-goal-progress-bar-color”: [

                “FF0000”

            ],

            “wc-donation-goal-display-donor-count”: [

                “enabled”

            ],

            “wc-donation-goal-close-form”: [

                “”

            ],

            “wc-donation-goal-close-form-text”: [

                “”

            ],

            “wc-donation-progress-on-shop”: [

                “”

            ],

            “wc-donation-progress-on-widget”: [

                “”

            ],

            “wc-donation-cause-display-option”: [

                “hide”

            ],

            “donation-cause-names”: [

                “”

            ],

            “donation-cause-desc”: [

                “”

            ],

            “donation-cause-img”: [

                “”

            ],

            “tributes”: [

                “”

            ],

            “wc_donation_product”: [

                “77”

            ],

            “total_donors”: [

                “”

            ],

            “total_donations”: [

                “”

            ],

            “total_donation_amount”: [

                “”

            ]

        }

    },

    {

        “ID”: 74,

        “post_author”: “1”,

        “post_date”: “2022-09-06 13:49:27”,

        “post_date_gmt”: “2022-09-06 13:49:27”,

        “post_content”: “”,

        “post_title”: “A Campaign by API”,

        “post_excerpt”: “”,

        “post_status”: “publish”,

        “comment_status”: “closed”,

        “ping_status”: “closed”,

        “post_password”: “”,

        “post_name”: “a-campaign-by-api-2”,

        “to_ping”: “”,

        “pinged”: “”,

        “post_modified”: “2022-09-06 13:49:27”,

        “post_modified_gmt”: “2022-09-06 13:49:27”,

        “post_content_filtered”: “”,

        “post_parent”: 0,

        “guid”: “http://wpexperts.local/wc-donation/a-campaign-by-api-2/”,

        “menu_order”: 0,

        “post_type”: “wc-donation”,

        “post_mime_type”: “”,

        “comment_count”: “0”,

        “filter”: “raw”,

        “campaign_meta”: {

            “_thumbnail_id”: [

                “3341”

            ],

            “wc-donation-tablink”: [

                “tab-1”

            ],

            “wc-donation-disp-single-page”: [

                “yes”

            ],

            “wc-donation-disp-shop-page”: [

                “yes”

            ],

            “wc-donation-amount-display-option”: [

                “free-value”

            ],

            “pred-amount”: [

                “a:3:{i:0;s:5:\”10.25\”;i:1;s:5:\”20.25\”;i:2;s:5:\”30.25\”;}”

            ],

            “pred-label”: [

                “a:3:{i:0;s:6:\”label1\”;i:1;s:6:\”label2\”;i:2;s:6:\”label3\”;}”

            ],

            “free-min-amount”: [

                “1”

            ],

            “free-max-amount”: [

                “5000”

            ],

            “wc-donation-display-donation-type”: [

                “select”

            ],

            “wc-donation-currency-position”: [

                “after”

            ],

            “wc-donation-title”: [

                “Help for the cause”

            ],

            “wc-donation-button-text”: [

                “Donate Us”

            ],

            “wc-donation-button-text-color”: [

                “00ff00”

            ],

            “wc-donation-button-bg-color”: [

                “2e6057”

            ],

            “wc-donation-recurring”: [

                “enabled”

            ],

            “_subscription_period_interval”: [

                “6”

            ],

            “_subscription_period”: [

                “week”

            ],

            “_subscription_length”: [

                “52”

            ],

            “wc-donation-goal-display-option”: [

                “enabled”

            ],

            “wc-donation-goal-display-type”: [

                “percentage_amount”

            ],

            “wc-donation-goal-fixed-amount-field”: [

                “12000”

            ],

            “wc-donation-goal-fixed-initial-amount-field”: [

                “1250”

            ],

            “wc-donation-goal-no-of-donation-field”: [

                “”

            ],

            “wc-donation-goal-no-of-days-field”: [

                “”

            ],

            “wc-donation-goal-total-days”: [

                “0”

            ],

            “wc-donation-goal-progress-bar-color”: [

                “FF0000”

            ],

            “wc-donation-goal-display-donor-count”: [

                “enabled”

            ],

            “wc-donation-goal-close-form”: [

                “enabled”

            ],

            “wc-donation-goal-close-form-text”: [

                “goal is ended now”

            ],

            “wc-donation-progress-on-shop”: [

                “enabled”

            ],

            “wc-donation-progress-on-widget”: [

                “enabled”

            ],

            “wc-donation-cause-display-option”: [

                “show”

            ],

            “donation-cause-names”: [

                “a:2:{i:0;s:7:\”cause 1\”;i:1;s:7:\”cause 2\”;}”

            ],

            “donation-cause-desc”: [

                “a:2:{i:0;s:6:\”desc 1\”;i:1;s:6:\”desc 2\”;}”

            ],

            “donation-cause-img”: [

                “a:2:{i:0;s:92:\”https://woocommerce-224605-1524250.cloudwaysapps.com/wp-content/uploads/2022/02/chai-tea.svg\”;i:1;s:91:\”https://woocommerce-224605-1524250.cloudwaysapps.com/wp-content/uploads/2022/02/chicken.svg\”;}”

            ],

            “tributes”: [

                “a:3:{i:0;s:31:\”In the Honor of Donation Plugin\”;i:1;s:33:\”In the Honor of Restaurant Plugin\”;i:2;s:23:\”In the Honor of Objects\”;}”

            ],

            “wc_donation_product”: [

                “75”

            ],

            “total_donors”: [

                “1”

            ],

            “total_donations”: [

                “1”

            ],

            “total_donation_amount”: [

                “2000”

            ]

        }

    }

]

WooCommerce

The most customizable eCommerce platform for building your online business.

  • 30-day money-back guarantee
  • Support teams across the world
  • Safe and secure online payment