Update restriction status with Webhooks
-
Hello everyone!
I’m currently trying to set up the automatic registration when a user is created with a Zapier Webhook. With this webhook, I change the role to a custom one, as well as sending an action for WordPress to perform after the user has been created.
I tried the following code:
function custom_role_meta_fn($user_id) { $user_meta= get_userdata($user_id); $user_roles=$user_meta->roles; if (in_array('subscriber_custom', $user_roles)){ update_user_meta( $user_id, 'simple-restrict-slug', 'yes'); } } add_action('custom_role_meta', 'custom_role_meta_fn');Unfortunately, it’s not updating the permission in the user profile. Could you help? Thank you in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Update restriction status with Webhooks’ is closed to new replies.