You can use the user_register
action to run your user meta update when a user registers.
/**
* Sets the user meta key '_sb_pkg_type' to 'free' when a user registers.
*
* @param int $user_id ID for the user who has registered.
*/
function wpse_update_user_meta_pkg_type( $user_id ) {
update_user_meta( $user_id, '_sb_pkg_type', 'free' );
}
// Fire late to try to ensure this is done after any other function hooked to `user_register`.
add_action( 'user_register','wpse_update_user_meta_pkg_type', PHP_INT_MAX, 1 );
The code above uses the priority PHP_INT_MAX
to try and ensure that it’s the last thing triggered on the user_register
hook, but without knowing how the plugin you’re working with is handling the user meta, it’s hard to say if this will be sufficient.
I did verify that this code updates the user meta key _sb_pkg_type
with a value of free
when a new user is registered though.