Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ajax call too functions.php

    var ajaxurl = 'https://example.com/wp-admin/admin-ajax.php';
    $.ajax({
        url: ajaxurl,
        type: 'post',
        data: { action: 'register_user' ,"username": "arshia"},
        success: function(response) { console.log(response); }
    });
 
PREVIOUS NEXT
Tagged: #ajax #call
ADD COMMENT
Topic
Name
5+7 =