admin管理员组文章数量:1427451
I am running an import script which adds a large number of product
post types. Some of these are identical apart from perhaps a size
or colour
value in the CSV.
My script creates the new post types (WP_Product using the WC_Data_Store) and ends up with what I would call duplicates:
post-name
post-name-1
post-name-2
post-name-3
etc
Is there a hook I can run to check if a post name already exists and if so, return it so that I can add the different colour
and size
taxonomy terms instead?
I would ideally need to check the merchant
taxonomy as well as the post name as it's possible there could be 2 different products with the same.
本文标签: hooksGet all posts with a duplicate name
版权声明:本文标题:hooks - Get all posts with a duplicate name 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745503227a2661126.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论