Answer the question
In order to leave comments, you need to log in
Does not really show the presence of residues in Woocomerce?
I uploaded the balances
and need to display whether the product is in stock or
not
UPDATE wp_postmeta
SET meta_value = 'yes'
WHERE meta_key = '_manage_stock'
Answer the question
In order to leave comments, you need to log in
This question has been raised time and again.
"Product" in Woo is not just an entry in the database - it is an entity, and changing some field can violate its integrity. And if several more product management plugins are connected, then the normal operation of these plugins will be disrupted.
The correct state change is via code via WC_Product
. Yes, it’s long, hard, but you have to break the blocks if there are a lot of goods. But it's safe.
$product = wc_get_product($id);
... делаем что то
$product->save();
stock_status
and into the table..._wc_product_meta_lookup
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question