Question

I am working on a project in which Products are being added by parsing a XML file.

For Variant product I am able to save all attributes and the product variant related to a product , but I am unable to save "Product Data" drop down value as "Variable Prouduct" using parser ( PHP code ).

Is there any metakey /metavalue for this.

Please help me. Thanks

Was it helpful?

Solution

Here is the answer which I have got

// Setting this as a Variable product
wp_set_object_terms( $post_id, 'variable', 'product_type' );
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top