#marin_api

1 messages ¡ Page 1 of 1 (latest)

stable notchBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1271378800797679719

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

rotund radish
#

Hi, I don't know how this plugin works. Do you access Stripe API directly in any way?

slim oriole
#

Hello Vanya, I have connect my site to Stripe. all is working but i cant pass data there... i can use functions.php. if you know wordpress

#

or you can guide me where to add meta data fields in stripe dashboard for all transactions

rotund radish
rotund radish
slim oriole
#

yeah but i need automatic process for that for future transactions

rotund radish
#

You can write a script to do this.

#

When do you need to add this metadata?

slim oriole
#

yeah i tried with this
function add_custom_metadata_to_stripe_payment( $payment_data, $form_data ) {
// Ensure the payment method is Stripe
if ( isset( $payment_data['payment_method'] ) && $payment_data['payment_method'] === 'stripe' ) {

    // Check if the 'form-name' field is present in the form submission data
    if ( isset( $form_data['form-name'] ) ) {
        // Add the 'form-name' field value as metadata to the Stripe payment
        $payment_data['meta_data']['form_name'] = sanitize_text_field( $form_data['form-name'] );
    }
}

return $payment_data;

}
add_filter( 'jet_form_builder/payment/submit-data', 'add_custom_metadata_to_stripe_payment', 10, 2 );

#

but it doesnt work

#

i cant see it in stripe

rotund radish
#

This is related to Jet, and I don't know how it works, unfortunately.

slim oriole
#

its ok thx anyway

rotund radish
#

Happy to help.