fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Populate default _variation_swatches_product_settings value

Hello

I’m actually using your Variation Swatches plugin for Woocommere: works great!

I’m creating product by syncing them with scripts from remotes APIs. I follow Woocommerce API “ways” to programmatically create simple and variable products. I want to edit the tooltip text of a variation.

I would like my “product syncer” to fill some of your plugin settings (“per product” settings). I can easily unserialize the “_variation_swatches_product_settings” post_meta value, edit what I want and re-serialize it. Issue is, the meta is empty until I submit the admin form. But most of my product are not created by admin. The “_variation_swatches_product_settings” array could be is risky to re-create dynamically as it uses array keys “slugified” from attribute name and values.

Is there any method in your plugin I can call to populate this meta with the default values? As it would if I submitted the admin form (all to default), with the swatch attribute form section of the variable product admin page.

Note that I know that I can let the meta empty and it’ll use ‘global’ options wich is great already, but I require a bit more customization/automatization.

 

Thanks

Golam Kibria

Hi Mathieu,

We are sorry for the late response. We were on a vacation.

Unfortunately, this feature is not currently available.

Will you please add your feature request here: https://storepress.fider.io/

Thank You

Hello,

I did what you suggested.

But are you sure the code of the plugin doesn’t contain anything to generate the object structure of the meta?

Golam Kibria

Hi Mathieu,

Yes, I am sure.

The meta is not populated (or there is no placeholder) before the product is created.

Thank You