• Resolved somatarani

    (@somatarani)


    Hi,

    I am trying to import a bunch of users, its working fine except I need to add them to a specific ‘group’ as set up by the Groups plugin: https://docs.itthinx.com/document/groups/

    I have tried various column headers to import that data – groups_member, groups, group, group_ID, none of these work. What custom field name do I need to put in to import that detail please?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @somatarani,

    What custom field name do I need to put in to import that detail please?

    Unfortunately, the Groups plugin you linked to actually uses a custom database table to assign users to groups, so you’d have to write custom code that uses our “is_iu_post_user_import” hook to do this.

    I don’t have a working example snippet for this particular use case, but here’s some code to show how you can use the hook:

    add_action( 'is_iu_post_user_import', function( $user_id, $userdata, $usermeta ) {
    	// Code here to assign the groups in the wp_groups_user_group table.
    	// If you store "group_id" as a column in your file, you can find that
    	// data in the $usermeta array.
    }, 10, 3 );
    Thread Starter somatarani

    (@somatarani)

    Thanks. I just did it individually this time, will look differently for next time.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘adding group membership – what column heading?’ is closed to new replies.