Last active
April 30, 2024 04:14
-
-
Save pramodjodhani/bcb6d435bfea5e38807587dccc0f71ae to your computer and use it in GitHub Desktop.
Gravity forms stripe - charge custom amount
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'gform_stripe_charge_pre_create', function ( $charge, $feed, $submission_data, $form, $entry ) { | |
// Enter the amount in cents. 600 = $6.00. | |
$charge['amount'] = 600; | |
return $charge; | |
}, 10, 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment