Which function adds the new user roles/ccaps?
-
Hey folks,
I would like to hook into WooCommerce after the order has been completed and add S2Member ccaps to the user as a bonus.
I need to combine WooCommerce with S2Member this way, because the both plugins are not enough by themselves.
So what I’ve been looking into, is the hook for WooCommerce:
<?php add_action( 'woocommerce_order_status_completed', 'my_function' ); /* * Do something after WooCommerce sets an order on completed */ function my_function($order_id) { // order object (optional but handy) $order = new WC_Order( $order_id ); // TELL S2Member TO ADD CCAPS }
It would be awesome, if anyone could point me in to the right direction…
What function needs to be called for S2Member to add ccaps?I am looking forward to the responses ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Which function adds the new user roles/ccaps?’ is closed to new replies.