Support

Home Forums Event Espresso Premium Stripe – how to modify order data?

Stripe – how to modify order data?

Posted: January 27, 2025 at 9:16 am

Viewing 8 reply threads


David Anderson

January 27, 2025 at 9:16 am

We need to customize the order data being sent to Stripe for our back office team.

Specifically, adding more information to the order and also modifying the order description.

Are there any hooks and examples showing how to do this?


Tony

  • Support Staff

January 27, 2025 at 9:35 am

Hi there,

Using Stripe elements?

If so you can use this hook:

FHEE__EEG_Stripe_Onsite__doDirectPaymentWithPaymentIntents__payment_intent_data

Examples:
https://gist.github.com/joshfeck/1f18dc42a926f045a6f0159de1df4eeb
https://gist.github.com/joshfeck/7835142b09f8a8a3502b70f9c36ac3b5


David Anderson

January 27, 2025 at 12:31 pm

Thanks – that works. What’s the best way to access the complete order details within that function (line items, tickets, etc)?


Tony

  • Support Staff

January 27, 2025 at 3:04 pm

Line_items… as in EE line items or Stripes? (You can’t change/set Strieps line items within there)

The filter is passed the EE_Transaction as the 3rd param, so you can pull in everything you would need from that.

The EE Model system lets you pull in pretty much every detail, take a look here:

https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System

Quickest option to view what you have available is to use something like Kint/Sage to output the EE_Transaction object and viw all of the methods available on it.


David Anderson

January 28, 2025 at 5:51 am

Wanting to grab EE line items because we’ll be using that for the Stripe description.

Looks like that github link is private?


David Anderson

January 28, 2025 at 5:55 am

Found it: https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System

An example of how to fetch the order data would be great.


Tony

  • Support Staff

January 28, 2025 at 6:21 am

It is the forum messing with the formatting, the URL is:

https://github.com/eventespresso/event-espresso-core/tree/master/docs/G--Model-System

(the -- gets converted)

An example of how to fetch the order data would be great.

You’ll need to be way more specific here.

What are you referring to as ‘the order data’? Everyone wants something different.

For example $transaction->items_purchased(); may get what you need, or not, depends on what you want to do and how deep you need to walk through line items.


David Anderson

January 28, 2025 at 7:51 am

Thanks – that worked. I was able to loop over the items_purchased and grab the name field.


Tony

  • Support Staff

January 28, 2025 at 3:46 pm

Ah, great!

Glad it helped 🙂

Viewing 8 reply threads

The support post ‘Stripe – how to modify order data?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso