is_page() conditional not working inside an AJAX function

If this is executed within an ajax request, is_page() won’t be set. the page you’re making the request from was a previous request. you need to set something on the originating page to pass with your ajax request to let it know it’s for your special case page.