eventsmanager

Adding Stripe invoice API param

Aug 1st, 2026
1,163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. * Not yet fully tested
  5. */
  6. function my_em_stripe_payment($stripe_checkout,$EM_Booking){
  7. $stripe_checkout['payment_method_types'] = ['card', 'sepa_debit','sofort','us_bank_account'];
  8.  
  9. $stripe_checkout['invoice_creation'] = [
  10. 'enabled' => true,
  11. 'invoice_data' => [
  12. 'footer' => 'Thank you for your business!',
  13. 'metadata' => [
  14. 'booking_id' => $EM_Booking->booking_id,
  15. ],
  16. ]
  17. ];
  18.  
  19. $stripe_checkout['customer_email'] = $EM_Booking->get_event()->get_contact()->user_email;
  20.  
  21. return $stripe_checkout;
  22. }
  23. add_filter('em_gateway_stripe_checkout_session_vars', 'my_em_stripe_payment', 100,2);
Advertisement