• The add to cart button always shows ‘ler mais’ (read more) even though the bundle (and all individual items) are in stock.
    Knowing the product is available I tried to change the button label in admin panel, but it also doesn’t work. Even if I try force the text “Adicionar” (add to cart) for products that are no available, it does not work.
    The same error happens in both store page and product page.
    I saw that there was a Topic about this subject and it was closed as “resolved” but I couldn’t find the solution.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • hi @kosoniscs,
    You can use this method when you want to change some words in the same language or want to translate without using another plugin.

    Please add below code to current theme (or child-theme) / functions.php

    add_filter( ‘gettext’, ‘wpc_translations’, 99, 2 );
    function wpc_translations( $translation, $text ) {
    if ( $text === ‘Qty:’ ) {
    return ‘Cant:’;
    }

    if ( $text === ‘Original text’ ) {
    return ‘Your text’;
    }

    return $translation;
    }

    Thread Starter kosoniscs

    (@kosoniscs)

    Hi Haithh93! Thanks for your reply.
    I did it, but it didn’t work.
    As the original text I first tried “see more” and some variations of capital letter (I don’t know if it is case sensitive or not). I supposed that the original text is in English. I also tried “read more” but it didn`t work as well.
    Then, I tried to replace the text that is currently showing in button (in portuguese) “Leia mais” to “Adicionar” (Add to cart), but it still didn’t work.
    Is there a way to I can see the original text before translation? Or, is there another way to replace this button text?
    Thanks!

    Plugin Author WPClever

    (@wpclever)

    Hi @kosoniscs

    Please also check this option https://www.screencast.com/t/unQcScaRbUHF

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add to cart button shows ‘read more’ even though bundle is in stock’ is closed to new replies.