SHARE
TWEET

wp-travel-customize

a guest Apr 23rd, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function wp_travel_customize_sale_price_display( $s, $c, $d ) {
  2.   return sprintf( esc_html__('%1s %2s', 'wp-travel' ), number_format( $d , 2 ), $c );
  3. }
  4. add_filter( 'wp_travel_itinerary_sale_price', 'wp_travel_customize_sale_price_display', 99, 3 );
  5.  
  6.  
  7. function wp_travel_customize_price_display( $s, $c, $d ) {
  8.   global $wp_travel_itinerary;
  9.   if ( $wp_travel_itinerary && $wp_travel_itinerary->is_sale_enabled() ) {
  10.      return  sprintf( esc_html__(' %1s %2s', 'wp-travel' ), number_format( $d , 2 ), $c );
  11.      return $s;
  12.   }
  13.   return sprintf( esc_html__('%1s %2s', 'wp-travel' ), number_format( $d , 2 ), $c );
  14. }
  15. add_filter( 'wp_travel_itinerary_price', 'wp_travel_customize_price_display', 99, 3 );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top