I'm building a wordpress eshop using woocommerce and I want to integrate it with an existing erp tool. I have complete the 90% of all the connections but I'm facing a problem with variable products and I can't find a solution by reading the documentation. I need some more info about how to create a variable product through the erp.
Below is what I'm currently doing:
I am creating an entry in wp_posts with post_type product and for the variation and I'm creating another entry on wp_posts with post_type product_variation and post_parent the ID of the product that holds the variation.
I believe that I'm missing something because doing only the above is not working as expected.
postmeta
table, and also you have to addtaxonomy
,term
for main product. Moreover you also have to add postmeta table with attribute name and value for which it is variable. I'm flagging this question as too broad because it will take atleast 2 page to explain the whole logic – Raunak Gupta