Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter WP CMS Ninja

    (@billiardgreg)

    Figured out how to do this, here is the code that I added to the functions.php file to allow for a custom min amount.

    function check_donation_amount($valid_data, $posted) {
    	if ($posted['give-amount'] < 5)
    		give_set_error('donation_amount','The donation amount must be $5 or more. Please go back and select a specified amount or enter a larger donation amount.' ,'give');
    }
    
    add_action( 'give_checkout_error_checks', 'check_donation_amount', 10, 2 );
    Plugin Author Devin Walker

    (@dlocc)

    Nice, I’m glad you got that figured out. I’m going to add this to: https://github.com/WordImpress/Give-Snippet-Library

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Control Min Amount’ is closed to new replies.