WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. cokeyblokey
    Member
    Posted 9 months 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.

    http://wordpress.org/extend/plugins/woocommerce-radio-buttons/

  2. DesignLoud
    Member
    Plugin Author

    Posted 9 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.