@rinatkhaziev I had a few minutes to look over your code this morning. Overall, I think you’re off to a good start. I have a couple of quick comments at this point:
- Creating, editing, deleting, and getting ad codes should be decoupled from the AJAX requests so we can reuse the methods elsewhere
- AJAX should use the admin ajax approach as much as possible, so we’re only firing the hooks on exactly the right actions.
I also left a few comments in the form of code comments.