Support » Plugin: PayPal Donations » Need help implementing purpose filter

  • Resolved andrew1239


    I am trying to help a local non profit with their wordpress site using this plugin, but am inexperienced in this.
    I want to add a dropdown to allow users to select a purpose for a donation.
    I see the sample code to do this:

    // Add a drop down menu for donation purposes
    function paypal_purpose( $purpose ) {
    return ‘
    <select name=”item_name”>
    <option value=”Donation Purpose 1″>Donation Purpose 1</option>
    <option value=”Donation Purpose 2″>Donation Purpose 2</option>
    add_filter( ‘paypal_donations_purpose_html’, ‘paypal_purpose’ );

    I’ve been unable to figure out how to implement this. I don’t know where to put this code to create the dropdown on a single donate page. When I try to edit the Theme’s functions.php file, it gives an error. I believe this is a hosted site.

    Can someone give me basic instructions on how to implement this?

    Thanks in Advance

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support mbrsolution


    Hi Andrew, I think the following plugin would suite you better for what you want to achieve.

    And here are some instructions the help you further.

    Let me know if this helps you.

    Thank you

    Thanks for the quick reply. This plugin seems focused on selling products with set prices. We are collecting donations of various amounts for different purposes. This plugin doesn’t seem to support the concept of passing a donation purpose as a text field to PayPal, which is what I’m trying to do.

    I may be able to use the current plugin and use shortcode to display multiple buttons, one for each purpose, and set the purpose statically instead of using a dropdown.


    Plugin Support mbrsolution


    Hi, the plugin I shared above does accept donations and it even allows for drop down options. Did you read the docunentation I shared above?


    Yes, I did read the documentation you shared, and watched the tutorials. The plugin does support dropdowns, but dropdowns of products with prices. I am looking for a dropdown of “Purposes”, with no specified donation amounts. Purpose is a field that is passed to PayPal and indicates what purpose the donation is for. I could put each purpose as a product (with a set price, or $0) in this new plugin to create a dropdown. The plugin does allow for other donation amounts through another text box. However, this is now three steps for the donor (choose product/purpose from dropdown, type donation amount, click donate). I see how this may work, but this option is less preferred than creating multiple donation buttons (one click) with set purposes using shortcode in the original plugin.
    Thanks for the help,

    Plugin Support mbrsolution


    Hi Andrew, yes that would work probably better than my suggestion for what you are looking for.

    Do you still need more support? If not, can you mark this support thread as resolved.

    Thank you



    I am still curious how to implement the dropdown code, but this may not be the appropriate place. Marking as resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.