Accept an order in WooCommerce and automatically add subscriber to a group
-
Hi All,
Here is what I want to implement, I want that when I accept an order in WooCommerce the system automatically adds the student buyer to a tutorial class in WP SMS plugin, I am new to WordPress so I will try to give as much detail as possible.
There are two Plugins: Woocommerce and WP SMS Plugin
A buyer as a student, buys something (tutorial class) on the website, they will fill out their names, phone number, address, which tutorial class etc. Then the system sends the order to the WooCommerce system, then if I accept the order, I would select the tick option of the order and the student buyer is successfully registered in the tutorial class.Right now, I also have a WP SMS plugin, so I can send SMSs to students of a particular class to remind them there is a class today/tomorrow etc. Currently I need to go to WP SMS and manually add the student (fill out student name, phone number and which class) to a particular class.
My question is what should I do so when I accept the order (select the TICK option), the system automatically adds this student to the class so I don’t need to do this step manually.
My current idea is when I select the TICK option, it must trigger a function in WooCommerce. When I manually fill out student’s detail and select AddStudent in WP SMS, it must also trigger a function in WP SMS.
So what if I code a my small function such that after the TICK function, TICK function calls MyOwn function, MyOwn function gets the student.name, student.phonenumber and student.class and MyOwn function calls the AddStudent function and pass the three variables to AddStudent function, then AddStudent function add the student to a class using the three variables provided.
I am NEW to WordPress so I don’t know if my idea is doable? I don’t know which function in WooCommerce is the TICK option and which function in WP SMS is the AddStudent function. And is there a more convenient way of implementing such function? PLEASE help me!
THANKS TO ALL!
- The topic ‘Accept an order in WooCommerce and automatically add subscriber to a group’ is closed to new replies.