Woocommerce Radio Buttons
[resolved] Any way to alter the 'Choose An Option...' text? (2 posts)

  1. cokeyblokey
    Posted 3 years ago #

    Hi, nice plugin and it works fine for me.

    I would like to change the 'Choose An Option...' text found in the 'variables.php' file but I don;t want to lose the change when the plugin is updated.

    I thought about adding something to my themes functions file to replace the text. I found this code but I'm lost as to what to put in for the first argument in the add_filter:

    function replace_text_wps($text) {
            $text = str_replace('Choose An Option...', 'Choose An Option to see the price...', $text);
            return $text;
    add_filter('WHAT GOES HERE?','replace_text_wps');

    Is there a better way to do this?
    Any help much appreciated.


  2. DesignLoud
    Plugin Author

    Posted 3 years ago #

    Hi blokey, I would just copy the variables.php file from our plugin and put it in your themes -> woocommerce -> templates directory. Then change the text in that file. It should take priority over any of the other variables.php files found on your server.

    If that doesnt work then you can just change the text in the plugin, if there are any more updates they will be for compatibility reasons. But the above approach would be my suggestion.

    Hope that helps you. I dont think there are any actions or filters you can hook into for that but I may be wrong.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Woocommerce Radio Buttons
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.