Posted: 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? |
|
Hi there, Using Stripe elements? If so you can use this hook:
Examples: |
|
Thanks – that works. What’s the best way to access the complete order details within that function (line items, tickets, etc)? |
|
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. |
|
Wanting to grab EE line items because we’ll be using that for the Stripe description. Looks like that github link is private? |
|
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. |
|
It is the forum messing with the formatting, the URL is:
(the
You’ll need to be way more specific here. What are you referring to as ‘the order data’? Everyone wants something different. For example |
|
Thanks – that worked. I was able to loop over the items_purchased and grab the name field. |
|
Ah, great! Glad it helped 🙂 |
|
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.