Assign role based on user domain not working

[ad_1]

Hello-

I found this snippet of code here: [https://isotropic.co/how-to-set-wordpress-user-role-based-on-email-domain/])

I updated the domains but it is still not working. The code is in my functions.php, I go to the user’s page and refresh but nothing changes.

Any idea what I need to do? it says that I have to hook the function to the init but I don’t understand what that means.

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer