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

Sign In or Register to comment.