Forum Replies Created
- AuthorPosts
Jacky
ParticipantThis is the code I currently have in my functions.php, is it clashing maybe?
function wp_travel_customize_sale_price_display( $s, $c, $d ) {
return sprintf( esc_html__(‘Prix à partir de %1s %2s’, ‘wp-travel’ ), $c , $d );
}
add_filter( ‘wp_travel_itinerary_sale_price’, ‘wp_travel_customize_sale_price_display’, 99, 3 );
function wp_travel_customize_price_display( $s, $c, $d ) {
global $wp_travel_itinerary;
if ( $wp_travel_itinerary && $wp_travel_itinerary->is_sale_enabled() ) {
return sprintf( esc_html__(‘Prix à partir de %1s %2s’, ‘wp-travel’ ), $c , $d );
// return $s;
}
return sprintf( esc_html__(‘Prix à partir de %1s %2s’, ‘wp-travel’ ), $c , $d );
}
add_filter( ‘wp_travel_itinerary_price’, ‘wp_travel_customize_price_display’, 99, 3 );function wp_travel_trip_price_customize( $post_id, $hide_rating = false ) {
$settings = wp_travel_get_settings();
$trip_price = wp_travel_get_trip_price( $post_id );
$enable_sale = get_post_meta( $post_id, ‘wp_travel_enable_sale’, true );
$sale_price = wp_travel_get_trip_sale_price( $post_id );
$currency_code = ( isset( $settings[‘currency’] ) ) ? $settings[‘currency’] : ”;
$currency_symbol = wp_travel_get_currency_symbol( $currency_code );
$per_person_text = wp_travel_get_price_per_text( $post_id );
// $wp_travel_itinerary = new WP_Travel_Itinerary();
?>
<div class=”wp-detail-review-wrap”>
<?php do_action( ‘wp_travel_single_before_trip_price’, $post_id, $hide_rating ); ?>
<div class=”wp-travel-trip-detail”>
<?php if ( ” != $trip_price || ‘0’ != $trip_price ) : ?>
<div class=”trip-price” >
<?php if ( $enable_sale ) : ?>
<span><?php echo apply_filters( ‘wp_travel_itinerary_price’, sprintf( ‘ %s %s ‘, $currency_symbol, $trip_price ), $currency_symbol, $trip_price ); ?></span>
<?php endif; ?>
<span class=”person-count”>
<ins>
<span>
<?php
if ( $enable_sale ) {
echo apply_filters( ‘wp_travel_itinerary_sale_price’, sprintf( ‘ %s %s’, $currency_symbol, $sale_price ), $currency_symbol, $sale_price );
} else {
echo apply_filters( ‘wp_travel_itinerary_price’, sprintf( ‘ %s %s ‘, $currency_symbol, $trip_price ), $currency_symbol, $trip_price );
}
?>
</span>
</ins>
Personne
</span>
</div>
<?php endif; ?>
</div>
<?php do_action( ‘wp_travel_single_after_trip_price’, $post_id, $hide_rating ); ?>
</div>
<?php
}
remove_action( ‘wp_travel_after_single_title’, ‘wp_travel_trip_price’, 1 );
add_action( ‘wp_travel_after_single_title’, ‘wp_travel_trip_price_customize’, 0 );Jacky
ParticipantI pasted the code in my child theme’s functions.php, is this correct?
Jacky
ParticipantI would also be happy to remove that text completely
Jacky
ParticipantThank you so much but it didnt work, my text is still saying La personne.
It is possible someone changed it somewhere else but I don’t know where
http://dev.shiftone.co.za/satravel/
Also, I pasted the code in my child theme’s functions.php, is this correct?
Jacky
ParticipantI really need help on this urgently
Jacky
ParticipantPlease help, I need to know how to change or remove the person text next to the price
Jacky
ParticipantThe link is expired, please repost
https://gist.github.com/Tiiru/0df83b22bbc24edff7bffa4d6b7a3527
- AuthorPosts