Advertisement
eventsmanager

Booking id as Reference Id

Sep 11th, 2013
575
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. /*
  2. Create placeholder for reference id which uses booking id
  3. however this is padded by 0 and max of 10 digit.
  4. */
  5. add_filter('em_booking_output_placeholder','my_em_placeholders_custom_bookingid',1,3);
  6. function my_em_placeholders_custom_bookingid($replace, $EM_Booking, $result){
  7. switch( $result ){
  8. case '#_REFERENCEID':
  9. $replace = str_pad($EM_Booking->booking_id, 10, '0', STR_PAD_LEFT);
  10. break;
  11. }
  12. return $replace;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement