Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
403 on ajax post creating Wordpress Plugin

I am creating a plugin in wordpress that needs an AJAX call. The call goes through, but I get a 403.

I've gone through tutorials and checked other plugin codes and can't figure out why it's not working. Apparently all my enqueues are OK.

This is my main.php plugin code:

function launchRecommender(){
    wp_enqueue_style( 'ai-plugin-css', plugin_dir_url( __FILE__ ) . 'css/style.css');
    wp_enqueue_script('ai-plugin-js', plugin_dir_url( __FILE__ ). 'js/index.js', array( 'jquery' ));
    wp_localize_script('ai-plugin-js', 'ia', array(
        'pluginsUrl' => plugins_url()
    ));

    include('includes/recommender.php');
}

add_shortcode('recomendador', 'launchRecommender');

And this is the JS code that after being executed receives the 403 error:

jQuery.ajax({
    type: "POST",
    url: ia.pluginsUrl + "/plugin-name/includes/process.php",
    data: {student_email:'ex@ex.com'},
    action: "",
    success: function(xml) {
        console.log(xml)
    },
    error: function(e){
        console.log(e)
    }
})

Do I need an additional hook? Is the url badly managed?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!