Hello!
I have an admin-ajax request that uses x_get_view() function to render content and send it back. But after I updated PRO theme to the latest version, it stopped working.
After some research I found that x_get_view() function that is needed is placed in /pro/framework/functions/frontend/view_routing.php but now, after update, all “frontend” files don’t loading on admin-ajax requests because there is this condition:
if ( ! is_admin() ) { $this->boot_context('front_end'); }
and all admin-ajax requests don’t pass this condition. Usually there is another condition for such cases: wp_doing_ajax()
So when I added this to the code:
if ( ! is_admin() || wp_doing_ajax() ) { $this->boot_context('front_end'); }
everything worked as expected and now x_get_view() is working in admin-ajax requests again. But since I don’t want to edit parent theme, would you please update pro/functions.php file with wp_doing_ajax() condition in patch? Or is there another way?