• Resolved kostniczka

    (@kostniczka)


    Hello, my issue is that there are no payment methods passed to translated version of my site.

    All of them work only on original (Polish) version, but none of them for some reason is valid for English version.

    The message I get is:

    Sorry, it seems that there are no available payment methods for your state.

    • This topic was modified 3 years, 1 month ago by kostniczka.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Anghel Emanuel

    (@anghelemanuel99)

    Hello there,

    Thank you for letting us know about this!

    Since this looks a lot like a conflict with some other code, the first/next recommended step is the conflict test (ideally in a staging environment):

    ​​Briefly disable all other plugins and enable the default Twenty Twenty One theme. Please also disable all add-ons. If this fixes the problem, as it probably will, enable everything one by one, checking each time to see when the problem returns.

    Please let us know when you find the conflict so that we can take a look and see what we can do about it.

    Kind Regards,

    Thread Starter kostniczka

    (@kostniczka)

    Hello, thank you for the reply. I have already checked if it’s theme or other plugins. I have put the page to maintenance mode and switched to twenty-twenty one and also disabled all the plugins, leaving only woocommerce, translatepress and tpay (payment module), but the problem persists.

    I believe the conflict exists between tpay and translatepress.

    I had some success by overriding is_available() function in tpay module – the payment gateway did show, but when I tried to pay i got “Invalid payment method” message.

    Thread Starter kostniczka

    (@kostniczka)

    I also got the the answer from Tpay support and the only advice they have is “please remove translatepress and use something else”…

    • This reply was modified 3 years, 1 month ago by kostniczka.
    Thread Starter kostniczka

    (@kostniczka)

    Hey @anghelemanuel99, I have resolved the problem and also I think that I have found a bug in your plugin.

    In Translatepress file: /includes/gettext/class-process-gettext.php

    Line no. 254 in version 2.5.0 there is this condition:

    if ( ($text != 'Name: %1$s, Username: %2$s' && $text != 'Name: %1$s, Guest' && $domain == 'woocommerce-payments') || $domain != 'woocommerce-payments') 

    I have commented out the last part:

    if ( ($text != 'Name: %1$s, Username: %2$s' && $text != 'Name: %1$s, Guest' && $domain == 'woocommerce-payments') /*|| $domain != 'woocommerce-payments'*/) 

    and my payment gateway works like a charm. I am not exactly sure what you wanted to achieve by this condition, but for me it looks like there should be more braces maybe?

    However, now there are some front-end issues but they are only in console and probably slightly decreasing site performance, but for now the most important is that my payment gateway works in all language versions of site.

    Could you please look into this?

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

The topic ‘No available payment methods for different language’ is closed to new replies.