Support » Plugin: Charitable - Donation Plugin » charitable_minimum_donation_amount not working

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Eric Daams

    (@ericdaams)

    Hi @worellana,

    What would you like to have as the minimum donation amount?

    Could you post your code here or in a gist?

    Cheers,
    Eric

    Hi @ericdaams

    Thanks for the response, well I need to set up the minimum amount to 0, Why? well there is a pdf download so my client wants to ask for a donation but he wants the possibility to set the donation to 0 and download the pdf for free, the donation is optional

    I have added the following lines of code to the end of the theme function.php file

    /**
     * Allow people to "donate" $0.
     */
    add_filter( 'charitable_minimum_donation_amount', function() { 
        return 0;
    });
    
    /**
     * You need to specifically enable $0 donations.
     */
    add_filter( 'charitable_permit_0_donation', '__return_true' );
    

    I have tried to add 0 to the suggested donation amount but doesn’t work also I have tried to submit the personalized amount to 0 and doesn’t work either.

    Plugin Author Eric Daams

    (@ericdaams)

    Hi @worellana,

    You’re right, this isn’t working as it should be. I’ve made a note of the issue over at https://github.com/Charitable/Charitable/issues/668 and will make sure we get this fixed.

    Cheers,
    Eric

    Plugin Author Eric Daams

    (@ericdaams)

    Marking this as closed as this issue is now fixed.

    Cheers,
    Eric

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