webaware

gateway name in Events Manager booking email templates

Nov 1st, 2012
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. add_filter('em_booking_output_placeholder','my_em_get_payment_type',1,3);
  2.  
  3. /**
  4. * add some conditional output conditions for Events Manager bookings
  5. * @param string $replacement
  6. * @param object $EM_Booking
  7. * @param string $result
  8. */
  9. function my_em_get_payment_type($replacement, $EM_Booking, $result){
  10.     if (is_object($EM_Booking)) {
  11.         if ($result == '#_PAYMENTGATEWAY') {
  12.             $replacement = $EM_Booking->booking_meta['gateway'];
  13.         }
  14.     }
  15.  
  16.     return $replacement;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment