Advertisement
Beee

paymentinfo placeholder

Mar 24th, 2015
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. // create #_PAYMENTINFO
  2. function em_paymentinfo_placeholder($replace, $EM_Event, $result) {
  3.     if ( $result == '#_PAYMENTINFO' ) {
  4.         global $EM_Event;
  5.     $bankinfo = do_shortcode('[event id="'.$EM_Event->event_id.'"]#_ATT{Bank IBAN}[/event]');
  6.     if ( $bankinfo ) {
  7.             $replace = do_shortcode('[event id="'.$EM_Event->event_id.'"]IBAN: #_ATT{Bank IBAN}<br />{has_bic}BIC/Swift: #_ATT{Bank BIC}<br />{/has_bic}{has_accountholder}Name on account: #_ATT{Account holder}<br />{/has_accountholder}[/event]');
  8.     } else {
  9.         $replace = 'If you choose to pay cash for Super Mango Clinic, don\'t forget to bring it ;)';
  10.     }
  11.     }
  12.     return $replace;
  13. }
  14. add_filter('em_event_output_placeholder','em_paymentinfo_placeholder', 1, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement