Skip Navigation

[Resolved] WooCommerce Subscriptions plugin with Toolset

This support ticket is created 6 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 6 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1148729

Hi, I need a Subscription solution to my website. Have read your tutorial "How to use the WooCommerce Subscriptions plugin with Toolset" and I have one question. I have a WordPress Multisite and when a user registers, I want the new user to automatically get a subsite on the network (www.mainsite.com/username). Has a funciton that has worked with regular registration:
add_action ('user_register', 'user_registration_create_site', 10, 1);

function user_registration_create_site ($ user_id) {

$ user_info = get_userdata ($ user_id);
if (isset ($ user_info-> user_login)) {
$ main_site = 'weareyou.online'; // Add your main domain here
wpmu_create_blog ($ main_site, '/'.$user_info->user_login.'/', $ user_info-> user_login, $ user_id, array ('public' => 1));

}

}

Will the function also work if I follow the steps of the description "How to use the WooCommerce Subscriptions plugin with Toolset"?

/ Nicklas

#1149985

Hi, at first glance it looks okay to me but I'm not 100% certain. The registration and subscription process described in that document is all handled by WooCommerce Subscriptions. Toolset's APIs aren't used during the process, and I don't have detailed technical information about when the user_register hook is fired by WooCommerce Subscriptions. I recommend trying it out on a test or staging site before you implement it on a real site. If you need more detailed information about registration workflow with WooCommerce Subscriptions, I recommend reaching out to their support team or reviewing their documentation.