Log Error with wc_get_related_products
Hi!
I've been working with the WooCommerce support to resolve some issues I've been having with my products, and they've highlighted an error in the logs:
2025-08-27T00:21:46+00:00 Error Invalid limit type passed to wc_get_related_products. Expected integer, got string with value: "4"
We thought this might have been resolved with the last Theme update, but it's still showing. We're not sure if this is what's causing a conflict with my current issues: Variations not sticking (I setup and save variations in products, save, then publish the product, but the variations no longer match to their SKU...I have to re-set it, save, Update....and then occasionally I get a "duplicate or invalid SKU" error, when I haven't touched the SKUs).
Is this something you can look into, or is there something I should be doing differently? I have related products set to my single products template. But I've noticed it's not necessarily accurate to the products (it just seems like it's pulling random products). This might also be because I currently have my "more info" in the Description field (it's pretty standard info across all products) and use the Short Description field for product specific info (since this was how the default Single Product template was set up as). But I'm finding out that SEO is looking at the Main Description but for readability and scores, so I'm not sure what else relies on info in that field, too (like related products). So I'm in the process of flip flopping the info in those fields. I tried to do this in bulk via CSV upload, but it's not updating anything correctly, even when checking the update existing products. This is another issue I'm working with the WooCommerce support team, and it may or may not also be linked to this related products error. We're trying to eliminate any possibly sources as we go. So this is also why I'm sharing.
Thanks for your help!
Comments
Hi,
Please always attach a link to your website so we can check it out. If the page is offline(localhost), then our help will be limited. You will have to contact us when the page is online. Also, please make sure that the page is not under maintenance before you provide us with the link.
It is always a good idea to also attach a screenshot showing your issue.
Thanks
My site is www.sydtropolis.com
We're not exactly sure if or what issues the error is causing. We're just trying to rule it out as being a source of my current issues updating products and trying to set variations.
Please also attach a screenshot showing your problem.
Thanks