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.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.