← Back to documentation

Add these snippets to your child theme’s functions.php file or use a plugin such as Code Snippets ↗. Avoid adding custom code directly to the parent theme’s functions.php file, as it will be overwritten by theme updates. Replace the values highlighted in red with your own custom values.

Customize “Appointment” label

add_filter( 'nshk_easy_scheduling_appointment_labels', 'easy_scheduling_custom_appointment_labels', 10, 1 );

function easy_scheduling_custom_appointment_labels( $labels ) {

$labels = array(
__( 'Appointment', 'noushka-easy-scheduling' ),
__( 'Appointments', 'noushka-easy-scheduling' )
);

return $labels;

}

Customize “Date” label

add_filter( 'nshk_easy_scheduling_date_selection_label', 'easy_scheduling_custom_date_label', 10, 1 );

function easy_scheduling_custom_date_label( $label ) {
return __( 'Date', 'noushka-easy-scheduling' );
}

Customize “Time” label

add_filter( 'nshk_easy_scheduling_time_selection_label', 'easy_scheduling_custom_time_label', 10, 1 );

function easy_scheduling_custom_time_label( $label ) {
return __( 'Time', 'noushka-easy-scheduling' );
}

Customize “Book now” label

add_filter( 'nshk_easy_scheduling_add_to_cart_text', 'easy_scheduling_custom_add_to_cart_text', 10, 2 );

function easy_scheduling_custom_add_to_cart_text( $text, $product ) {
$return __( 'Book now', 'noushka-easy-scheduling' );
}