• Resolved sideways

    (@sideways)


    Hi, as in the title, I need to set the donation amount to 0 in some modules, but if I try to turn it to 0 the amount automatically switches to default amount 1 €.
    Is there a way to change the default amount?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Matt Cromwell

    (@webdevmattcrom)

    The best way to do that is simply to force the focus to be on the custom amount field when the page loads. That can be done with a simple JS snippet.

    https://github.com/impress-org/give-snippet-library/blob/master/form-customizations/auto-focuse-on-amount.php

    If you need guidance implementing custom PHP functions on your website, we have this guide here: https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/

    Generally, we recommend that you set a good minimum donation amount and a suggested donation amount (the default) rather than $0 — encouraging the amounts that you want to receive helps donors be more generous. Contrary to what might seem natural, it doesn’t scare them away.

    Thanks!

    Thread Starter sideways

    (@sideways)

    Thank you Matt,
    unfortunately the snippet doesn’t make the job.
    I know it is a bit weird to set the default amount to 0, but we wanted to use the modules not only for the donations, but also for subscriptions to free courses we offer to caregivers. This way we can manage the two things with the same modules… That’s why sometimes I need to put the default amount to zero: so users can simply fill the module wityhout paying anything (they’ll do it when they’ll attend the course if they want!).

    Hope there’s a way to do this, instead of using another plugin…

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Unfortunately, it’s not possible currently to use Give for a $0 donations, we require a $1 minimum donation amount for all transactions currently.

    You can do this with Javascript

    window.addEventListener("load", function amount() {
      document.getElementById('give-amount').value = '0.00';
    })

    However as Matt says you can’t set the minimum amount lower than 1.00$.

    • This reply was modified 5 years, 12 months ago by emilo9.
    • This reply was modified 5 years, 12 months ago by emilo9.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Set default donation amount to 0’ is closed to new replies.