• The site I’m working on centers around LearnDash for selling courses. Users either register when purchasing a course (WooCommerce form) or through the free membership sign-up (which uses the ‘User Registration’ plugin form).

    What I need is a way to assign every new user (no matter which form they use) to the core ProfileGrid group. I would like this to happen automatically as it ties into other features on the site (bbpress forums for example). I know I can do this with [profilegrid_register gid=”1″] – but that doesn’t help me when it comes to assigning users who purchase a course using WooCommerce. And I’m not thrilled with the ProfileGrid registration form, even with Registration Magic integration.

    I know enough from my research and toying around with ProfileGrid that this feature is not available. Is there some sort of script that can make this happen or an integration I’m not aware of?

Viewing 1 replies (of 1 total)
  • Plugin Author ProfileGrid Support

    (@profilegrid0)

    Hello @shelaine,

    Thank you for writing to us.

    ProfileGrid does not have any integration with LearnDah as of now. We have noted this requirement and forwarded it to our management team for further review and analysis.

    You may apply the below code in your site’s current theme’s functions.php file to assign a group on WooCommerce purchase completion:

    
    add_action( 'woocommerce_order_status_completed', 'assign_pg_group', 10, 1);
    
    function assign_pg_group($order_id)
    {
    $order =  wc_get_order($order_id);
    $user = $order->get_user();
     $pmrequests = new PM_request;
     $pmrequests->profile_magic_join_group_fun($user->ID,$gid,'open');
    }
    

    Here $gid is the ID of a ProfileGrid Group.

    I hope it helps, let us know if you have any other questions.

    • This reply was modified 3 years, 5 months ago by Yui.
    • This reply was modified 3 years, 5 months ago by Yui. Reason: formatting
Viewing 1 replies (of 1 total)
  • The topic ‘assign new user to profilegrid group ( via learndash / woocommerce registration)’ is closed to new replies.