Skip to content

Instantly share code, notes, and snippets.

View andreilupu's full-sized avatar
⌨️
Hitting keys

Andrei Lupu andreilupu

⌨️
Hitting keys
View GitHub Profile
@andreilupu
andreilupu / How to send a POST request from WordPress admin Dashboard – JS
Last active April 6, 2018 09:47
How to send a POST request from WordPress admin Dashboard
(function(){
var request = wp.ajax.post('custom_action', {param1: 'uppercase this string pls'});
// on success
request.done( function ( res ) {
console.log( res );
});
// on fail