最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - Add a WooCommerce Product Variant with attributes programmatically

programmeradmin1浏览0评论

I am creating a custom import script (say from a CRM system) and I need to create products and product variations.

I have been unable to find any recent snippets about how to do this in the most recent version of WooCommerce. I am able to find some outdated approaches, but these do no longer work.

Could somebody provide and example code of how to programmatically create a product variation and attach attributes to this?

发布评论

评论列表(0)

  1. 暂无评论