• Resolved dimiro93

    (@dimiro93)


    Hello,
    In a woocommerce eshop, I’m using the Woodmart theme along with TranslatePress.
    Woodmart has a feature called Waitlist, where a customer/visitor can subscribe to a waitlist when a product is out of stock. Then, they get an email as soon as they subscribe and another email when the product is back in stock.

    The eshop I’m working on, is in greek and I have used the tranlatePress plugin to add english.

    So, now I have the following issue.
    I’m subscribing as a guest to a product’s waitlist from the greek version.
    Both emails arrive with greek content.
    However, the Back-in-stock email contains the product’s greek url, while the Waitlist-subscription has the english url (/en/product/my-wait-product).

    Both emails use the esc_url( $email->object->get_permalink() ) function in order to display the product url. I have looked at both emails and didn’t find any changes (other than the text).

    Any ideas on why this is happening?

    Thank you in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Daniel

    (@danieldandu)

    Hello @dimiro93 ,

    Thank you for your message.

    This can happen if an incorrect translation for the URL was previously saved in the database.

    Please try searching for this link inside the String Translation interface. If the link is generated directly by the Woodmart Waitlist functionality, you should find it in the Gettext tab. If the link was manually added as part of a customized email template, then it should appear in the Regular tab instead.

    If you find the Greek URL saved there, you can update or remove the translation and then test the email again afterward.

    Let me know how it goes.

    Thread Starter dimiro93

    (@dimiro93)

    Hello @danieldandu

    Thank you for your reply.

    I searched the String Translation interface and didn’t find the url I was looking for. However, I found a lot of other product urls containing /en/.

    My questions are:
    What is their use?
    What will happen if I delete them?
    How and when are they created?

    Also, the en/ product urls are saved greek version and I can’t edit them.

    Thread Starter dimiro93

    (@dimiro93)

    Hello again,

    After some tests, I’ve noticed the following:
    In the waitlist-subscribe-emai.php, I’ve used
    <?php echo esc_html( $email->object->get_permalink() ); ?>
    and the url displays in greek, as it shoud.

    However, when I change the product link php at the table like below, the link keeps coming with /en/.
    <td class=”td xts-tbody-td xts-align-start”>
    <a class=”product-link” href=”<?php echo esc_html( $email->object->get_permalink() ); ?>”>
    <?php echo esc_html( $email->object->get_name() ); ?>
    </a>
    </td>

    What is the problem?

    Thread Starter dimiro93

    (@dimiro93)

    I finally solved the issue by adding the data-no-translation data-no-translation-href to the <a> tags of the email.

    So now, it displays the urls based on the visitor’s language.

    Plugin Support Daniel

    (@danieldandu)

    Hello @dimiro93

    Thank you for the update.

    Glad to hear you managed to solve it and that everything is working properly now.

    Have a great day!

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.