Use class method from plugin as action hook
-
Hi, I’m using the WordPress Groups and Groups File Access plugins to handle file access and downloads on my site. The Groups File Access plugin has a class called “Groups_File_Access”, and within that class a method called “groups_file_served”.
My goal is to trigger a custom function whenever that method gets called from the plugin. In my functions.php file, I test the existence of the method with method_exists(“Groups_File_Access”, “groups_file_served”) and it returns true.
I essentially want to do something like add_action( array(“Groups_File_Access”, “groups_file_served”), “my_custom_function”) but haven’t been successful with this. Any help or suggestions would be greatly appreciated!
Thanks,
Anna
The topic ‘Use class method from plugin as action hook’ is closed to new replies.