Documentation

Add these snippets to your child theme’s functions.php file or use a plugin like Code snippets. Don’t add code directly to the parent theme’s functions.php file as it will be overridden by updates. Customize the texts/values in red to whatever you need.

Change “Start” and “End” texts

add_filter( 'easy_booking_start_text', 'wceb_custom_start_text', 10, 2 );

function wceb_custom_start_text( $text, $product = false ) {
    $text = __( 'Your custom text', 'woocommerce-easy-booking-system' );
    return $text;
}
add_filter( 'easy_booking_end_text', 'wceb_custom_end_text', 10, 2 );

function wceb_custom_end_text( $text, $product = false ) {
    $text = __( 'Your custom text', 'woocommerce-easy-booking-system' );
    return $text;
}

Change “/ day” text

add_filter( 'easy_booking_get_price_suffix', 'easy_booking_custom_price_suffix', 10, 3 );

function easy_booking_custom_price_suffix( $suffix, $_product, $booking_duration ) {
    $suffix = 'your custom text';
    return $suffix;
}

Add text before “/ day”

add_filter( 'easy_booking_price_html', 'easy_booking_display_custom_price', 10, 3 );

function easy_booking_display_custom_price( $price_html, $product, $price ) {
    $content = 'From ' . $price_html;
    return $content;
}

Add text after “/ day”

add_filter( 'easy_booking_price_html', 'easy_booking_display_custom_price', 10, 3 );

function easy_booking_display_custom_price( $price_html, $product, $price ) {
    $price_html .= ' your custom text';
    return $price_html;
}

Change “Select date(s)” text

add_filter( 'easy_booking_select_dates_text', 'easy_booking_custom_select_dates_text', 10, 2 );

function easy_booking_custom_select_dates_text( $text, $product ) {
    $text = __( 'Your custom text', 'woocommerce-easy-booking-system' );
    return $text;
}

Change “Total booking duration” text

add_filter( 'easy_booking_total_booking_duration_text', 'wceb_custom_total_booking_duration_text', 10, 3 );

// $duration is the selected duration and $unit "days" or "nights"
function wceb_custom_total_booking_duration_text( $text, $duration, $unit ) {
    $text = __( 'Your custom text', 'woocommerce-easy-booking-system' );
    return $text;
}

Change “Average price” text

add_filter( 'easy_booking_average_price_text', 'wceb_custom_average_price_text', 10, 3 );

function wceb_custom_average_price_text( $text, $product, $average_price ) {
    $text = __( 'Your custom text', 'woocommerce-easy-booking-system' );
    return $text;
}

Remove “Average price” text

add_filter( 'easy_booking_display_average_price', '__return_false' );