Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

97
Vistas
What is the best practice to send AJAX requests in Wordpress for plugin developers

We're developing an Wordpress plugin, and for that we need to send some AJAX requests in the admin side across files within our own plugin directory. Currently it is working fine if I send it directly to that specific file url, like-

$.get("https://www.example.com/wp-admin/admin.php?page=sample_projects&action=delete&id=01&noheader=true", function(status){ //Do something here });

But I'm reading everywhere in the community that to use AJAX in Wordpress I need to direct requests to admin-ajax.php. I found a good documentation here- https://codex.wordpress.org/AJAX_in_Plugins

So, my questions are-

  1. What problems may I face if I send the requests directly to this file?
  2. If I need to send it to admin-ajax.php, where do I include my javascript and PHP codes?

Thanks in advance, and sorry if this question seems repetitive to you.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda