Advertisement
Guest User

Untitled

a guest
Feb 4th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. jQuery.ajax( {
  2.  url: Slug_API_Settings.root + 'wp/v2/users/',
  3.  method: 'POST',
  4.  beforeSend: function ( xhr ) {
  5.  xhr.setRequestHeader( 'X-WP-Nonce', Slug_API_Settings.nonce );
  6.  },
  7.  data:{
  8.      email: 'someone@somewhere.net',
  9.      username: 'someone',
  10.      password: Math.random().toString(36).substring(7)
  11.  }
  12. } ).done( function ( response ) {
  13.  console.log( response );
  14. } )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement