Answer the question
In order to leave comments, you need to log in
Programmatic SKU entry in WooCommerce. Search doesn't work. What to do?
I fill the product in WooCommerce programmatically.
I create product records. The article is written using the function update_field('_sku', 'Value of the article', $ID)
The article is displayed in the admin panel. Also on the product page. But in the admin panel, the search by article does not work. If you go into editing the product and "Update" the search starts working.
Answer the question
In order to leave comments, you need to log in
$product = wc_get_product( $ID );
$product->set_sku('Значение артикула');
$product->save();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question