Title: Dev &#8211; wp_insert_post
Last modified: February 21, 2024

---

# Dev – wp_insert_post

 *  Resolved [photogenic](https://wordpress.org/support/users/photogenic/)
 * (@photogenic)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/dev-wp_insert_post/)
 * This is a developer to developer question, probably more fit for github. I also
   coded a way to merge orders but I have been plagued by a bug on our live environment
   which I just can’t seem to fix: Sometimes merged orders are combined with random
   client orders.
 * When looking at your code to see if you maybe had a smart idea how to approach
   some things, I noticed that you commented out wc_create_order function and used
   wp_insert_post instead. Is there any reason for it?
 * Nothing else struck me as wildly different from how I did it…

Viewing 1 replies (of 1 total)

 *  Plugin Author [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * (@fahadmahmood)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/dev-wp_insert_post/#post-17444154)
 * I am available on slack too, anyways it is not about creating an order but the
   selection criteria and I do not rely on the functions totally. Where I need the
   accuracy, I use custom MySQL queries to make sure if I am merging the correct
   set of orders?
    -  This reply was modified 2 years, 3 months ago by [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/).

Viewing 1 replies (of 1 total)

The topic ‘Dev – wp_insert_post’ is closed to new replies.

 * ![](https://ps.w.org/woo-ultimate-order-combination/assets/icon-256x256.png?rev
   =2642767)
 * [Ultimate Order Combination](https://wordpress.org/plugins/woo-ultimate-order-combination/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-ultimate-order-combination/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-ultimate-order-combination/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-ultimate-order-combination/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-ultimate-order-combination/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-ultimate-order-combination/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/dev-wp_insert_post/#post-17444154)
 * Status: resolved