hooks - Get all posts with a duplicate name

I am running an import script which adds a large number of product post types. Some of these are identical apart from pe

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745503228a4630510.html

相关推荐

  • hooks - Get all posts with a duplicate name

    I am running an import script which adds a large number of product post types. Some of these are identical apart from pe

    13小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信