Support » Plugin: PayPal Donations » More Options?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Johan Steen

    (@artstorm)

    Hi,

    The plugin those not expose those parameters on the frontend. The plugin does allow that behavior to be overriden using a filter though. The purpose is exposed to allow for a change on the frontend. You can hook into that filter and change it to a text box for instance.

    paypal_donations_purpose_html

    I’ll probably add more filters in a future version, but in the current version, using the purpose filter, should get you close to your need anyway.

    Cheers,
    Johan

    Plugin Contributor Johan Steen

    (@artstorm)

    Let me know if you have any problems implementing a filter, and I can give you some example code.

    I try to avoid to expose to many of the optional/specialized parameters in the GUI, to keep the plugin as simple to use as possible.

    I have no idea about any of this but am pretty keen on figuring coding out. I will give it a shot, and in the interim if you see this and have a chance, could you post an example so I can take a look and compare what I’ve got?
    Thank you,
    -GvnrRickPerry (Duane)

    Plugin Contributor Johan Steen

    (@artstorm)

    This might help you get going, place it in your theme’s function.php file.

    add_filter( 'paypal_donations_purpose_html', 'display_paypal_purpose' );
    
    function display_paypal_purpose( $field )
    {
    	$field = str_replace( 'hidden', 'text', $field );
    	$field = '<label for="item_name">Purpose:</label>'.$field;
    	return $field;
    }

    Cheers,
    Johan

    Johan,
    You are the bomb! All I did was add the above code to the function.php file and wallah! It gives me exactly what I need!

    Honestly, I didn’t expect anyone to be so helpful with the question I had proposed, but you have really gone above and beyond with the code you provided!

    I will admin, it’s not the *best* looking as far as formatting goes, but I’m so afraid I’m going to mess something up if I go in and try to fix the formatting that I’m not going to touch it.

    I really do appreciate you providing that code and answering my questions. You are truly an asset to this community. If there’s anything I could ever do for you, please just let me know!
    Thank you again!
    -GvnrRickPerry (Duane)

    Is there a way to also add the reference to the front end?

    thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘More Options?’ is closed to new replies.