Error in using ‘admin_enqueue_scripts’ action through a class

There are several problems here: Problem 1: plugin_dir_url In a comment you mentioned using this code to load the file the class is in: define(“Plugin_root”, plugin_dir_url(FILE)); include_once(Plugin_root . ‘public/index1.php’); This results in this value being used in include_once: include_once( ‘http://example.com/wp-content/plugin/public/index1.php` ); Which is why you’re getting PHP fatal errors when you try to use the … Read more

To perform the requested action, WordPress needs to access your web server

if you want to skip this popup on the every action (like plugin or theme activation) you can go to wp-config.php file and paste the code define(‘FS_METHOD’,’direct’); define(“FTP_HOST”, “<server>”);//for eg.localhost define(“FTP_USER”, “<wordpress admin username>”); define(“FTP_PASS”, “<wordpress admin password>”); It works for me please try.

Change a subsite Admin role of a WordPress Multisite after 24 hours registering

You probably want the built-in cron scheduler. You’ve got two options: either set up a one-off job to downgrade the user 24 hours after registering using wp_schedule_single_event() instead set up a daily job with wp_schedule_event() to check all blogs for users without KYC data and deactivate them if necessary. You should probably change your code … Read more