Woo Donations Shortcode

Below, you’ll find a detailed guide on how to add the Woo Donations Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Woo Donations Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Woo Donations Plugin and the shortcodes it provides:

Plugin Icon
Woo Donations

"Woo Donations is a seamless WordPress plugin designed to aid charitable causes by integrating donation functionality into your WooCommerce store."

★★★★☆ (18) Active Installs: 4000+ Tested with: 6.2.3 PHP Version: 5.2.4
Included Shortcodes:
  • [wdgk_donation]

Woo Donations [wdgk_donation] Shortcode

The Woo Donations shortcode is designed to handle donation functionalities on your WordPress site. It generates a donation form, allowing users to input their donation amount and add a note. The shortcode retrieves settings for the form, such as text, note, and product. It then checks the WooCommerce cart for any existing donations and displays the donation form with the relevant details. It also provides an Ajax URL for dynamic interactions.

Shortcode: [wdgk_donation]

Examples and Usage

Basic example – A shortcode to display a donation form with default settings

[wdgk_donation /]

Please note that the shortcode attributes are case-sensitive. Make sure to use the correct case when specifying the attributes.

PHP Function Code

In case you have difficulties debugging what causing issues with [wdgk_donation] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wdgk_donation', 'wdgk_donation_form_shortcode_html');

Shortcode PHP function:

[...]

Code file location:

woo-donations/woo-donations/woo-donations.php

Conclusion

Now that you’ve learned how to embed the Woo Donations Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *