Public Ticket #3718465

Error with product being added to basket

Closed
Comments
5 Tickets
reece started the conversation 2 years ago on September 5, 2024 at 10:09am

When adding this one product to the basket the site crashes and get the following error: 

Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given in /sites/http://www.forwardproducts.co.uk/files/wp-content/plugins/b2bking/public/class-b2bking-dynamic-rules.php:8257

This isn't anything different how this product is set up to the others and can't figure out why this is breaking. Any help would be much appreciated.

Thanks

2,762
KingsPlugins replied 2 years ago on September 6, 2024 at 5:59pm

Is it possible maybe to delete and recreate that product? It sounds like there may be a specific issue with its setup if it's the only product with issues. 

Based on the errors ("must be of type object|string, bool given"), it seems the product contains a "false" value instead of a $product object (WC_Product) for some reason. Usually we would see this for products that are deleted (in the trash / bin folder).


Other than that, it's hard to say what it could be, but happy to look into it further if you can share the last error details.

Sign In