We really like the idea of Pro Sites, but after some really extensive experience in a test environment, we’re finding that it’s just not going to workout for us.
Instead, we’ve decided to use WooCommerce Subscriptions.
WooCommerce has an extensive number of hooks that allow for customization. One of which is the ability to hook into and execute custom code after an order is complete (after a credit card is verified.)
Here is our scenario:
1) we have a template setup already that we were using with NBT / Pro Sites integration. It has a blog ID of 2
2) we have already written the code to customize the woocommerce checkout screen to include the same fields as Pro Sites – namely the site name and site title which are created for the client after a successful order.
This leads us to 3)
3) using woocommerce_order_status_completed hook** what code can I add here to clone the template we have available with Blog ID 2?
This is not the first time this question has been asked here at WPMUDev. Jude provided a direction here https://premium.wpmudev.org/forums/topic/create-sites-within-multisite-when-a-purchase-is-made-in-woocommerce
But, that thread is almost 2 years old. And, even though we’ve gotten through his first two steps his 3rd step isn’t very clear:
“FINALLY template it using NBT template it…
Unfortunately this last line is extremely unclear. Do we use that specific function to apply to the above hook?
As I said earlier, Pro Sites isn’t working out for us, and we need to be able to immediately clone a site using the NBT functionality as soon as an order is successfully complete.
The goal of this thread is to be able to have a solid block of code that let’s me do that.