Skip to content Skip to sidebar

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

Problem:
If you're experiencing issues with loading products on your screen and encountering errors such as 'Undefined property' related to regular price, sale price, and PHP8 support deprecation errors like 'Creation of dynamic property Whip_RequirementsChecker::$configuration is deprecated', this might be due to a known compatibility issue with PHP 8.2.

Solution:
First, we recommend checking our documentation on the PHP 8.2 deprecation issue: PHP 8.2 Deprecated: Creation of dynamic property.

If the issue is related to custom currency not being set for some products, it's possible that the product was originally a single product and later changed to a variable product. In this case, you can set the

_wcml_custom_prices_status

field to 0 for the container product by running the following SQL query:

UPDATE `wpcom2019_postmeta` SET `meta_value` = '0' WHERE `post_id` = '975' AND `meta_key` = '_wcml_custom_prices_status'

Please note that the solution provided might be irrelevant if it's outdated or not applicable to your case. If the issue persists, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please don't hesitate to open a new support ticket with us.

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 32 replies, has 2 voices.

Last updated by Bobby 1 year, 4 months ago.

Assisted by: Bobby.

Author Posts
March 1, 2024 at 8:32 pm #15364946

petriR

Sure, you can take the site and delete data afterwards. I have reinstalled the woocommerce, theme, wordpress and there is nothing relating to that when debug is on.

March 1, 2024 at 9:32 pm #15364976

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Perfect, will do that and update here once I have some feedback

March 2, 2024 at 3:43 am #15365212

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi,

I have been able to migrate the site, however, I cannot trigger the undefined warnings, I've tried both enabling the debug display as well as enabling error logging.

Is there a specific action that triggers it?

March 2, 2024 at 8:39 am #15365392

petriR

I have no idea but the issue at the frontend is constant which is more critical. Removing and adding items to cart fails with the plugin. Our talks with your colleague was about fixing that after the original issue which I thought were related. Randomly you cannot add or remove items with cart and it's only fixed by deactivating the multicurrency plugin.

hidden link

March 4, 2024 at 6:22 pm #15371721

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for the screencast, testing this and will get back to you with feedback shortly

March 4, 2024 at 8:08 pm #15371909

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Based on the issue you showcased in the screencast, I was able to reproduce it in our copy here:
hidden link

I noticed that this looks like a possible caching issue, which was indeed resolved after i deactivated the following plugins:

Litespeed cache -- which i believe to be the culprit
Maintenance -- deactivated to make load speed faster
Query Monitor - make load speed faster
Instagram Feed Pro Business -- deactivated since not working in staging to make loads faster

March 4, 2024 at 8:18 pm #15371945

petriR

On the live site the disabling the litespeed cache does not resolve the issue also the maintenance is not active on live site unless we do some work on the site. Could you provide me login to your staging site to test your setup?

March 4, 2024 at 8:53 pm #15372152

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Please use the above URL and your standard WP access details should work on this instance as well.

March 4, 2024 at 9:13 pm #15372209

petriR

Now your environment started throwing the same errors which I posted. ALSO I added plenty of products to cart and suddenly it didn't remove some of them. The Litespeed cache is and was disabled in your environment too.

Näyttökuva 2024-03-04 231158.png
March 5, 2024 at 7:52 pm #15376364

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for sharing this!

-- I noticed the removal of the product issue as well but for me, it was fixed once I deactivated Litespeed.

-- Anything in particular the triggered the warnings in your screenshot on the staging environment? I've added multiple products and I cannot get it to trigger.

Still testing, but I appreciate your input with this!

March 5, 2024 at 7:59 pm #15376408

petriR

The Litespeed was disabled when I logged in after you and did the removal test so the litespeed is not the culprit. I just randomly added several products from different categories and suddenly the errors were there.

March 6, 2024 at 9:59 pm #15381713

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Looks like the issue is happening only when I am using the USD currency and not the EUR, when I am logged in it defaults to EUR so I could not reproduce, when I am logged out it goes to USD so I can trigger it right around the 4-5th product add and within the shop.

When deactivating the multicurrency option OR switching from Show Currencies based on " Client Location" to "Site Language" it's resolved.

I will escalate this to our second tier team and get back once I have more feedback.

March 7, 2024 at 7:52 am #15382504

petriR

That would be nice since our company has not been able to serve our US and Canadian customers for weeks now...

March 8, 2024 at 9:12 pm #15390839

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi,

it looks like this is an edge case and it happens when some products have not set the custom currency, while specifying that they should use that

The problem is that the product most likely at some time was a single product, that was changed subsequentially to a variable product.

Thus we still check the custom prices for the container, despite that it does not matter.

So a simple workaround in the meantime is to set the _wcml_custom_prices_status field to 0 for the container product:

Running the following SQL Query seems to help resolve this:

UPDATE `wpcom2019_postmeta` SET
`meta_value` = '0'
WHERE `post_id` = '975' AND `meta_key` = '_wcml_custom_prices_status'

March 9, 2024 at 7:47 am #15391131
petriR

I did run that command in our environment and database but issue remains with not able to add products to cart. I can randomly add some product but then it just wont work anymore.

New threads created by Bobby and linked to this one are listed below:

https://wpml.org/forums/topic/split-undefined-property-errors/