Ajax handling in Elementor widget

admin

Administrator
Staff member
How to get an ajax request in the context of a class that extends from \Elementor\Widget_Base. The problem is that the widget is registered later on the "elementor/widgets/widgets_registered" hook, later on the hook responsible for registering ajax requests in wordpress.
Obviously, I can create a file in my plugin to connect it and process ajax requests in it, but I would like to implement this task within the widget class, how can I do this? I suspect there is a hook for this in the elementor, but I can't find it :)