0

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

1 Answer 1

0

Here is the answer which I have got

// Setting this as a Variable product
wp_set_object_terms( $post_id, 'variable', 'product_type' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.