Last active
May 20, 2025 08:29
-
-
Save LaxusCroco/351b46b51f5036bfe5245f91c7988c19 to your computer and use it in GitHub Desktop.
Revisions
-
LaxusCroco revised this gist
May 20, 2025 . No changes.There are no files selected for viewing
-
LaxusCroco created this gist
May 20, 2025 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ <?php add_action( 'jet-form-builder/gateways/before-create', function ( $request ) { $need_request = \Jet_FB_Stripe_Gateway\Compatibility\Jet_Form_Builder\Actions\Create_Checkout_Session::class; // We check whether this is a request to create a new payment in Stripe if ( ! is_a( $request, $need_request ) ) { return; } // We initialize the settings before the request. It is important $request->get_request_args(); /** * Here we can add the parameters we need. All their types are listed here * * @link https://stripe.com/docs/api/checkout/sessions/create */ $request->set_body( array( /** * Here you can specify your locale * * @see https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-locale */ 'locale' => 'da', ) ); } );