Plugin errored out and I had to diable it

[ad_1]

Can you take a look at the stock dependency that you created for the product that is having the error? Specifically, can you make sure that you have a valid integer value in the quantity field of the stock dependency?

What is the inventory available for the product or variation on which there is a dependency?

Are you using any inventory management plugins?

Product 1 is a 600 x 400mm sheet of material which is cut from product 2 which is a 1200 x 600 sheet of material.

Product 2 therefore has a dependency on product 1 (i.e. it is a group of 3 of product 1.

If I set product 1 to quantity of 60 then product 2 should be 20. I did this for the first set of products and it worked fine. Then I did it for another pair and it failed.

We are not using any inventory management plugin. We are using Thrive Themes Thrive Architect.

Do you have access to run a query against your database? If so, can you run the following and post the results?

select * from wp_postmeta where meta_key = '_stock_dependency';

{“enabled”:true,”stock_dependency”:[{“sku”:”lamgoldblack600400″,”qty”:”3″}]}

There’s only one row? You mentioned a dependency was added for another product.

Yes there had been a dependency saved for 1 product and it worked fine.

Then I tried to add a second one and got the site error so I had to disable your plugin.

If I reenable the plugin then my list of products doesn’t display properly and I cannot add any more dependencies

Can you share with me the output from this query:

SELECT option_name, option_value
FROM  wp_options
WHERE option_name LIKE '_transient_sdwc-product-settings%'
ORDER BY option_name;

option_name _transient_sdwc-product-settings-2027option_value {“enabled”:true,”stock_dependency”:[{“sku”:”lamsilverblack600400″,”qty”:””,”product_id”:790}]}

option_name _transient_sdwc-product-settings-2028
{“enabled”:true,”stock_dependency”:[{“sku”:”lamgoldblack600400″,”qty”:”3″,”product_id”:754}]}

It’s this one that’s causing the problem:

option_name _transient_sdwc-product-settings-2027option_value {“enabled”:true,”stock_dependency”:[{“sku”:”lamsilverblack600400″,”qty”:””,”product_id”:790}]}

It got saved with no value for the dependency quantity (”qty”:””). I’m working on a plugin update that will allow you to clear the plugin’s transients, but in the meantime can you clear that one or all of your DB transients?

Do you have a plugin for clearing transients from your DB? You can use something like Transients Manager By WPBeginner

yes that worked – thanks a lot for your help – really appreciate it 🙂

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer