Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

This topic contains 18 replies, has 2 voices.

Last updated by Kor 1 year, 3 months ago.

Assisted by: Kor.

Author Posts
March 13, 2024 at 3:34 pm #15405088

cecileG

WCML updates breaks UPS and Ultimate Gift Card plugin

March 13, 2024 at 3:49 pm #15405226

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Here is the ticket and I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

March 14, 2024 at 5:33 pm #15411764

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for responding.

Could you please revert the fix and provide details on the actions you took to resolve the issue? Specifically, I need to know which file you modified and the line of code you added to implement the fix.

Once I have this information, I will compile a report and escalate the matter to our 2nd Tier Support for further investigation into the custom fix you applied to resolve the issue.

March 15, 2024 at 8:57 am #15413308

cecileG

Hi,

It's done.
I had commented lines 1765 and 1801 of the file wp-content/plugins/woo-gift-cards-lite/public/class-woocommerce-gift-cards-lite-public.php :

$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );

Now, if you add a product to the cart (like "A demi-mot"), and try to access th cart page while logged in, there's a timeout :

PHP Fatal error: Maximum execution time of 30 seconds exceeded in /wp-content/plugins/sitepress-multilingual-cms/classes/utilities/class-debug-backtrace.php on line 137
or
PHP Fatal error: Maximum execution time of 30 seconds exceeded in /wp-content/plugins/sitepress-multilingual-cms/classes/utilities/class-debug-backtrace.php on line 153

When I comment lines 1765 and 1801, I no longer have this timeout error but I have the error with class ups_carrier not found as indicated in my previous message.

And I have these errors since I updated WCML. Before everythings used to work fine.

Hope you can find a solution.
Thank you

March 15, 2024 at 2:06 pm #15414749

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for your response.

It appears that the UPS and Ultimate Gift Card plugins have not undergone full testing or validation for compatibility with WPML, as they are not listed in our repository at https://wpml.org/plugin/.

This indicates that our developers have not specifically tested these plugins with WPML. However, it's worth noting that some plugins not listed in our repository may still be partially compatible or have the potential for compatibility with WPML.

I suggest reaching out to the support team or developers of the respective plugins to inquire about their compatibility status with WPML.

If the plugins are found to be incompatible, I recommend suggesting that they consider joining our 'Go Global' program (https://wpml.org/documentation/support/go-global-program/), where our Compatibility developers can assist them in ensuring their product becomes fully compatible with WPML, at no cost.

For now, what you can do would be to downgrade the WCML plugin so that it is compatible with the UPS and Ultimate Gift Card plugins. You can download the older versions here https://wpml.org/download/woocommerce-multilingual-multicurrency/?section=changelog .

Then, once the plugin is fully tested and compatible, you can then update the WCML or UPS and Ultimate Gift Card plugin to the latest version. It depends on where the fix is applied.

March 15, 2024 at 3:36 pm #15415199

cecileG

Hi,

Thanks for your reply.
I mentionned in my first message that the errors were triggered by just some lines added to your plugin WCML.
In WCML_WC_Shipping class, the add_hooks method has been modified from :

{code}
public function add_hooks() {
// …
 $this->shipping_methods_filters();
}
{/code}

to :

{code}
public function add_hooks() {
// …
 add_action( 'woocommerce_load_shipping_methods', Fns::withoutRecursion(
Fns::identity(),
[ $this, 'shipping_methods_filters' ]
), PHP_INT_MAX );
}
{/code}

Could you explain what this do ? I replaced the code by the old one and I have no error.
Why the shipping_methods_filters() has been added to the hook woocommerce_load_shipping_methods ?

Thank you

March 15, 2024 at 3:43 pm #15415236

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Could you please be more specific about which file and line number you're referring to the WCML_WC_Shipping class?

Also, you mentioned about this.

I had commented lines 1765 and 1801 of the file wp-content/plugins/woo-gift-cards-lite/public/class-woocommerce-gift-cards-lite-public.php :

$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );

Do you mean you need to edit both the WCML_WC_Shipping class and wp-content/plugins/woo-gift-cards-lite/public/class-woocommerce-gift-cards-lite-public.php file to fix the issue you had there?

March 15, 2024 at 4:13 pm #15415324

cecileG

The file is /wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-shipping.php, line 43 (in version 5.3.5).

When I edit only the file class-woocommerce-gift-cards-lite-public.php, I can fix the timeout on the cart page (without editing WCML). But then I have an another error with the giftcard product and the UPS plugin (error "ups_carrier" class not found).

But when I edit only the WCML_WC_Shipping class and replace the new code by the old one in add_hooks method, I can fix all the errors.
That's why I'd like to know the reason for this change ? And if putting back the old code won't have any impact on the rest of the features ? For me it seems ok to keep the old code, the shipping seems to work well my cart page and the checkout page.

Thank you

March 15, 2024 at 7:18 pm #15415914

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for responding.

Could you please undo the modifications made on the staging Website at hidden link?

I require the issue to be replicated on the cart page after adding this product: hidden link

This will enable me to generate a report for our 2nd Tier Support team to investigate further.

March 18, 2024 at 8:29 am #15419498

cecileG

Hi,

There is no more custom code in the plugins. I already revert the custom fix I added in woo-gift-cards-lite plugin last week. And I didn't added the custom fix in WCML on the staging.

To replicate the bug :
- log on to the site using the access details I have given you (or create a new customer account)
- add the product to the cart
- go to the cart page ( /panier )
- you shouldn't be able to display the cart page, there is a timeout caused by WCML

Thank you

March 18, 2024 at 9:48 am #15419896

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I've retested again and it seems to work fine as shown in this screen recording hidden link . Could you please try using another browser and let me know if you're still encountering the same issue?

Also, it would be helpful if you could record a short screen recording while you try to replicate the issue.

March 18, 2024 at 2:45 pm #15421833

cecileG

Hi,

Here the recording where I have the problem : hidden link

Could you try with a product with delivery too : hidden link ? And if still not the error, could you try to add a valid address on checkout page, and go back to cart page to test ?

Thank you

March 18, 2024 at 3:25 pm #15422232

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Could you please try adding a product to the cart using the account that you've created for me? It's still working fine when I tested it. hidden link

Let me know how it goes.

March 18, 2024 at 4:53 pm #15422643

cecileG

I have the same problem with your test account.
I added the product to the cart when I was not logged in. Then I went to /mon-compte and logged in. Then on the cart page I have the timeout.
I let the product in the cart, could you try again to log in and go on the cart page ? You should have the error too. I tested on Chrome and Safari.

Thank you

March 18, 2024 at 4:58 pm #15422652

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

It's probably some sort of restriction from your server. It's still working fine when I tested it here hidden link .

The topic ‘[Closed] WCML updates breaks UPS and Ultimate Gift Card plugin’ is closed to new replies.