Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<scrip>
$.ajax({
type:'post',
url : ajax_url,
data: {
action:'hello_ajax'
},
success: function (response) {
consloe.log(responce);
},
});
</script>
<?php
// example of creating ajax action
qw_add_action('qw_ajax_hello_ajax', 'hello_ajax_function');
function hello_ajax_function(){
echo 'Hello! this is ajax responce';
// you must use this at end
die();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.