Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
When I enable WooCommerce Stripe Gateway, there are no Stripe settings. I can’t change anything in the settings, I always get the “Error Saving settings”.

Solution:
Go to wp-content/plugins/woocommerce-multilingual/classes/Rest and edit the Functions.php file. Here, just change this line:

remove_filter( 'home_url', [ $wpml_url_filters, 'home_url_filter' ], - 10 );

to this:

remove_filter( 'home_url', [ $wpml_url_filters, 'home_url_filter' ], - 11 );

50% of people find this useful.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 19 replies, has 2 voices.

Last updated by marcM-23 2 years, 2 months ago.

Assisted by: Radu.

Author Posts
January 10, 2022 at 9:13 pm #10321859

marcM-23

Hi,

My Stripe Gateway worked fine for several years, until a few days ago. Today I found my plugin disabled and when I enabled it, there were no Stripe settings. I can’t change anything in the settings, I always get the “Error Saving settings”.

I narrowed it down to one plugin: WooCommerce Multilingual. When I disable it, my Stripe Gateway settings work. When I enable it, it breaks.

When I go to the settings page of the plugin I immediately get 3 error messages at the bottom, then they disappear:

– Error retrieving account keys
– Error retrieving settings
– Error retrieving account data

And if I try to change anything I get “Error Saving settings” message.

This is obviously urgent as my live site is broken and has no more credit card payment gateway.

I already have a staging site ready where you guys could play with it.

Thanks,
Marc

Screen Shot 2022-01-10 at 18.59.02.png
January 10, 2022 at 9:17 pm #10321915

marcM-23

I first opened a ticket with WooCommerce Stripe plugin support. Here is the thread for info: https://wordpress.org/support/topic/urgent-plugin-not-working-error-saving-settings/

January 11, 2022 at 11:40 am #10326307

Radu

Hey Marc,

Thank you for reaching out to the WPML support!

I just installed the WooCommerce Stripe Payment Gateway plugin on my website and when I go to the WooCommerce → Settings → Payments → Settings tab, I don't get any error message, even if the WooCommerce Multilingual is active.
I tried to enable and disable the Enable Stripe option but the error messages don't appear. However, once I try to add the keys, I get this message Error retrieving account keys. I tried to deactivate all the WPML plugins and I still get the same message.

Looks like I was able to save the keys after I deactivated and activated back WooCommerce Stripe Gateway, then go back to the plugin settings page. This time, the keys were saved correctly.

Once I activated back the WPML plugins too and tried again to save the keys, the issue was gone. I was able to save the keys, without deactivating WPML.

I'm not sure why was this needed but this did the trick for me. Can you give this a try on your website too and tell me if it makes the issue go away, please?

Thanks,
Radu

January 11, 2022 at 2:05 pm #10327703

marcM-23

Hi Radu,

This doesn't work for me. My setup is different, the plugin actually already has settings. And as long as WooCommerce Multilingual is activated, just opening the settings page shows errors (it can't retrieve any). Deactivating WooCommerce Multilingual allows for settings to be loaded and edited.

I can give you access to my staging site where you can see this for yourself and play with it. I need a quick fix to be able to put this back in production on my live site. Right now, I just don't have a credit card payment option and that can't be good for sales as you can imagine.

Thanks,
Marc

January 11, 2022 at 2:40 pm #10328061

Radu

Hey Marc,

I totally agree that not having one of the payment methods is not a good idea.
The next reply is set to be private so you can safely send me the credentials to the staging website so I can have a look.

Thanks,
Radu

January 12, 2022 at 11:46 am #10334921

Radu

Hey Marc,

Thank you for giving me access to the dashboard area. I prefer not to break anything, even if it's a standing website 🙂

Can you check the credentials that you sent to me, please? I tried to use them but I get a message that the password is incorrect.

Thanks,
Radu

January 12, 2022 at 12:31 pm #10335503

marcM-23

Hi Radu,

I updated the password to make it match with the one I gave you. It works now, I tested it. Sorry for the delay.

By the way, here is what the WooCommerce team wrote on my ticket with them:

From the conflict test, we found that the issue is due to the WooCommerce Multilingual: by OnTheGoSystems plugin so we won't be making any further changes to the site.

I just logged into your site to see if there are any related errors on the logs and I couldn't find any. So it seems that WooCommerce Multilingual support will be in the best place to support this issue since they will be familiar with the features of their plugin.

Best,
Marc

January 12, 2022 at 2:29 pm #10336609

Radu

Hey Marc,

Thank you for changing the password for the account you created for me.

I was able to check this one out and see why is this happening. The good news is that this can be temporarily fixed by going to WPML → Languages → Language URL format and unchecking the Use directory for default language option.

The bad news is that this is the only fix I can suggest for now. It seems that when the directory for default language is enabled, the request made by the Stripe Gateway plugin is done to this route:
hidden link

while the route should be without the /fr/ part. You can check the staging website where I made this change, the settings page is loading fine now.

I asked my colleagues to have a look at this to see if there's any other workaround that can be applied for now, before escalating this to the compatibility team for a closer look.
I'll give you an update about this as soon as one of my colleagues is having a look.

Thanks,
Radu

January 12, 2022 at 2:38 pm #10336721

marcM-23

Hi Radu,

Thanks for looking into it. Unfortunately I can't do your quick fix on the live site, all my pages are indexed with the /fr directory for French (which is the main language), I have google ads and all sorts of links pointing to the products in the store with /fr. So it's really not a good idea to change that as a temporary fix.

Can you look into maybe a piece of code to put in functions.php to go around whatever issue is happening until it gets properly fixed?

Best,
Marc

January 12, 2022 at 2:40 pm #10336823

marcM-23

Could there be a redirect done on the site with DNS to get hidden link to point to hidden link ?

Would that fix it temporarily?

January 12, 2022 at 3:25 pm #10337145

Radu

Hey Marc,

I understand that disabling this option is not a good idea (that's the reason why I said that this is the bad news) but for now, there's no other change I can suggest as a temporary fix.
I escalated this issue to the 2nd tier support and connected our internal thread to this ticket so I can keep you updated about the progress we're making on this.

Thanks,
Radu

January 12, 2022 at 3:35 pm #10337225

marcM-23

Radu, can you please answer my last message about redirecting that URL temporarily?

January 12, 2022 at 3:39 pm #10337233

Radu

Hey Marc,

I read your last message but I don't have any code for making this kind of change. For now, we can only wait for the 2nd tier to check this out and see what needs to be changed.

Regards,
Radu

January 12, 2022 at 3:44 pm #10337245

marcM-23

I can figure out how to do it in .htaccess like this:

RewriteEngine On
Redirect 301 /fr/wp-json/wc/v3/ <em><u>hidden link</u></em>

The question is whether that would work?

January 12, 2022 at 4:21 pm #10337775

Radu

Hey Marc,

I did look for this kind of redirect after you asked if a redirect of a route can be done but I didn't find anything about this. I don't think that the routes work like simple page links and that's why I didn't suggest this kind of redirect through the .htaccess file.

Thanks,
Radu

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.