Gravity Forms – Stripe – update field with Customer ID but before submission

I have a Gravity Form that Uses the Following:

Gravity Forms Salesforce Plugin

Stripe Addon

What im attempting to do is update a hidden field (input_58) right after payment from stripe is confirmed, with the Customer ID from stripe, but just before its sent to Salesforce ( this way salesforce get the customer id when it initially send without me having to login to the backend and pressing the resubmit to salesforce button ).

I’ve looked at:

Save Field Value

Update Entry Field

Pre Submission

Stripe Customer After Create

to no avail. I’m a novice at wordpress and functions (when it comes to backend code) so i tried multiple solutions by combining functions i found. here is one that I thought would work but im sure I screwed something up

add_action( ‘gform_stripe_customer_after_create’, ‘save_stripe_customer_id’ );
function save_stripe_customer_id( $customer ) {
$scus = $customer->id;
GFAPI::update_entry_field( $entry_id, 58, $scus );
}
}

Any assistance in trying to get this to work would be appreciated

Read more here:: Gravity Forms – Stripe – update field with Customer ID but before submission

Leave a Reply

Your email address will not be published. Required fields are marked *