variable.js(v5.8.2) fifuVariableVars.attribute_map is empty | WordPress.org

[ad_1]

On this page, if you click on any of the product attributes, they can’t be selected and the top of the stack shows: at HTMLSelectElement.<anonymous> (variable.js?ver=5.8.2:14:64)

A bit of a background: I use woocommerce api to submit this variable product following the FIFU documentation on variable product and product variation with two API calls: first to create a variable product with all predefined attributes and terms, and second to create the product variation. My attributes for product variation is empty, i.e., ‘attributes’ = [] to indicate that this variation applies to any case material and any phone model while my attributes for the variable product included the id/name/visible/variation/options keys/values.

The product loads up fine. But whenever I click on any of the attributes I would get the above error.

The funny thing is: if I go into Woocommerce admin to manually edit the product, by deleting the programtically created variation and re-create it by hand, then the product loads up fine and clicking on the attributes also works now.

I exported the jsons of the product before and after I made that manual deletion and recreation of the product variation, and compared the two jsons – not much of a difference in structure and in value. But somehow the FIFU seems to depend on my setting up product variation by hand. All my other manually products are working fine with clickable and functioning attribute buttons, Only programatically uploaded products have this problem.

Please help. Thank you!

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer