Support » Plugin: YITH WooCommerce Gift Cards » Change Button Text

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES


    Hello there,
    hope you are doing well! 🙂

    This text is modified by WooCommerce and not for the plugin, to change the button text on the Gift Cards products, you can add the next code in the functions.php of your active theme.

    function yith_ywgc_add_to_cart_button_text( $text, $product) {
        if ($product->get_type() == 'gift-card') {
            $text = __( 'Scegli', 'yith-woocommerce-gift-cards' );
        return $text;
    add_filter( 'woocommerce_product_single_add_to_cart_text', 'yith_ywgc_add_to_cart_button_text', 10, 2 );

    Could you check it and let us know any news, please?

    Have a nice day!

    Hells yeah MoFo!

    As always, Yith rulez, nothing more to say. You guys are the best!
    Question: I already know my client will want to make the website multi language in the future, I imagine the code will have to be modified accordingly correct? I don’t need it right now, but I’ll probably need this mod in the future eheheh

    Thanks again, you rule!
    – Joseph

    Plugin Author YITHEMES


    Hello Joseph,

    you are welcome! 🙂

    Yes, if the site is multi-language, the code will need a change. When you want this change, we will need the next info to try to create a code for you.

    – The multi-language plugin you are using
    – The languages of the site
    – The Text on each language

    Have a good day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.