P
P
Pavel Gogolinsky2016-01-13 17:41:59
WordPress
Pavel Gogolinsky, 2016-01-13 17:41:59

How to update display (refresh) category after adding a product?

I am using woocommerce plugin.
I add a new product to an empty category using the wp_insert_post () function;
The product is added, but this same category with the new product is not displayed in the list of categories.
If you go to the admin panel and resave the product manually, the category is displayed.
As I understand it, after adding a product, you need to update its category so that it understands that it is no longer empty and can be displayed on the site. How to update it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question