Guest User

Untitled

a guest
Jan 18th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. // Add this to the switch( $format ) statement in fpropdf_format_field() /format.php ~line 429
  2.  
  3. case 'address':
  4. $v = maybe_unserialize( $v );
  5.  
  6. if ( ! is_array( $v ) )
  7. break;
  8.  
  9. $address = '';
  10. foreach ( $v as $key => $this_value ) {
  11.  
  12. switch ( $key ) {
  13. case 'line1':
  14. case 'line2':
  15. $address .= $this_value . "\n";
  16. break;
  17. case 'city':
  18. $address .= $this_value;
  19. break;
  20. case 'state':
  21. $address .= isset( $v['city'] ) ? ', ' . $this_value : $this_value;
  22. break;
  23. case 'zip':
  24. $address .= isset( $v['state'] ) || isset( $v['city'] ) ? ' '. $this_value . "\n" : $this_value . "\n";
  25. break;
  26. default:
  27. $address .= $this_value;
  28. break;
  29. }
  30. }
  31.  
  32. $v = $address;
  33. break;
Add Comment
Please, Sign In to add comment