I
I
iXelper2019-12-15 18:02:16
WooCommerce
iXelper, 2019-12-15 18:02:16

How to set 'manage inventory' parameter in woocommerce php?

There is a code for adding a product:

$post_id = wp_insert_post(array(
    				'post_title' => 'Тест продукт',
    				'post_type' => 'product',
    				'post_staus' => 'publish', 
    				'post_content' => 'Большое описание',
    				'post_excerpt' => 'Краткое описание',
    				'post_category' => array(0)
    			));
    
    			wp_set_object_terms( $post_id, 'Категория', 'product_cat' );

Please tell me the parameter responsible for managing the balances
5df64af0f03e0361311040.png

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