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.
Our next available supporter will start replying to tickets in about 3.05 hours from now. Thank you for your understanding.
This topic contains 38 replies, has 4 voices.
Last updated by Lauren 4 years, 10 months ago.
Assisted by: Bruno Kos.
Author | Posts |
---|---|
January 16, 2020 at 7:56 am #5303573 | |
blazP-4 |
Hello Bruno, I did a reset of WPML. The problem still persists. Could you please send me the script you made changes in - class-wcml-currencies-payment-gateways.php Maybe I did something wrong when adding the code. I can also give you an access to my testing site for you to have a look. Best regards |
January 16, 2020 at 9:28 am #5304111 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, There is no particular script, I only did this: Regards, |
January 16, 2020 at 10:14 am #5304449 | |
blazP-4 |
Could you please paste here the code from lines 30 to 47. |
January 16, 2020 at 11:33 am #5304945 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, Here it is: public function __construct( woocommerce_wpml $woocommerce_wpml, WPML_WP_API $wp_api ) { $this->woocommerce_wpml = $woocommerce_wpml; $this->wp_api = $wp_api; } public function add_hooks() { add_action( 'init', array( $this, 'init_gateways' ) ); add_filter( 'woocommerce_gateway_description', [ $this, 'filter_gateway_description' ], 10, 2 ); add_filter( 'option_woocommerce_stripe_settings', [ 'WCML_Payment_Gateway_Stripe', 'filter_stripe_settings' ] ); if ( ! is_admin() ) { add_filter( 'woocommerce_paypal_supported_currencies', [ 'WCML_Payment_Gateway_PayPal', 'filter_supported_currencies' ] ); } } Regards, |
January 16, 2020 at 12:06 pm #5305211 | |
blazP-4 |
Hello Bruno, Thank you for the code. I have it the same. This is strange. I will build up a testing site now from zero with clean database and test what might cause this issue. It is very frustrating. Best regards, |
January 16, 2020 at 1:15 pm #5305729 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, Hopefully it will work on your clean installation - you can even create a Duplicator package from our site, import into your own server and start from there. Regards, |
January 17, 2020 at 8:04 am #5310089 | |
blazP-4 |
Hello Bruno, I've set up a fresh install of WP (clean database) with the plugins and settings I have on the original site. I was not able to recreate the issue. I assume that there is something in the database that is making a conflict to WPML or PayPal plugin at writing data that is send then to PayPal. It is weird since this issue only appears when there is a currency conversion in question. Nevertheless I do not have any ideas what to do more, therefore I will need to set up a web site with a new database. Thank you for your effort. Best regards |
January 17, 2020 at 8:24 am #5310305 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, Yes, that seems to be most reasonable and the "fastest" approach here. Hopefully everything will work properly from now on - I also suggest you do regular backups in case something goes wrong, so that you can quickly revert. I would suggest using Duplicator for quick backups, and if something goes wrong, we can also use them to deploy websites easily and debug. Given your confirmation, I'm closing here. Regards, |
January 22, 2020 at 6:17 pm #5343443 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
The client came back to report this finding. When you have taxes enabled in woocommerce, paypal standard does not work as it should. Reference: enable taxes function: https://docs.woocommerce.com/document/setting-up-taxes-in-woocommerce/ |