• Resolved fjr9

    (@fjr9)


    How can I change the text of the “actions after booking” buttons? I tried to add some js but it seems it won’t work. Is there a way to correctly add js to ssa? Or, can you tell me how to find the corresponding template files so that I can edit them? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Simply Schedule Appointments Support

    (@simplyscheduleappointments)

    Hello @fjr9

    You can change the text of any existing text in the plugin using the Loco Translate plugin.

    Just search up the button text in the Filter Translations field and enter the phrase you’d prefer it to say as a ‘translation’.

    I double-checked to make sure that the following phrases were changeable:

    Thread Starter fjr9

    (@fjr9)

    Hey, thanks. I’d rather not use Loco Translate. Is it impossible for you to provide me a way to do it on my own, such as one of my suggestions? Thank you for your time.

    Plugin Author croixhaug

    (@croixhaug)

    Hi @fjr9, I know adding another plugin to your site isn’t always ideal. If you’re comfortable with adding PHP code to your functions.php file (or a custom plugin), this code should help you achieve the same thing as LocoTranslate without adding the performance overhead of another plugin:

    
    add_filter( 'gettext', 'customize_ssa_button_text', 100, 3 );
    function customize_ssa_button_text( $translated_text, $text, $domain ) {
    	if ( $domain !== 'simply-schedule-appointments' ) {
    		return $translated_text;
    	}
    
    	if ( $text === 'Cancel Appointment' ) {
    		return 'Oops! Cancel My Appointment';
    	}
    
    	return $translated_text;
    }
    

    Note: if you just want to hide any of those buttons entirely, you can do so with CSS and we have some good examples of that here:
    https://simplyscheduleappointments.com/guides/hiding-buttons-using-css/#all-buttons-on-confirmation-screen

    Please let us know if you have any other questions!

    Thanks,
    Nathan

    Thread Starter fjr9

    (@fjr9)

    Hi! This is exactly what I wanted.Thank you so much!

    • This reply was modified 4 years ago by fjr9.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change button text’ is closed to new replies.