Guest User

WP Travel customize

a guest
Aug 15th, 2018
80
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function wp_travel_customize_price_display( $s, $c, $d ) {
  2.   global $wp_travel_itinerary;
  3.   if ( $wp_travel_itinerary->is_sale_enabled() ) {
  4.  
  5.     return $s;
  6.   }
  7.   return sprintf( esc_html__('From %1s %2s', 'wp-travel' ), $c, $d );
  8. }
  9.  
  10. add_filter( 'wp_travel_itinerary_price', 'wp_travel_customize_price_display', 99, 3 );
  11.  
  12.  
  13.  
  14. function wp_travel_customize_sale_price_display( $s, $c, $d ) {
  15.   return  sprintf( esc_html__('From %1s %2s', 'wp-travel' ), $c, $d );
  16. }
  17.  
  18. add_filter( 'wp_travel_itinerary_sale_price', 'wp_travel_customize_sale_price_display', 99, 3 );
RAW Paste Data