PHP:
...
if(update_field( 'post_status', 2, $postID ) && update_field( 'post_date', $postDate, $postID ) && update_field( 'post_time', $postTime, $postID )){
echo(json_encode( array('pinned'=>'success', '$postID'=>$postID) ));
}else{
echo(json_encode( array('pinned'=>'failure', '$postID'=>$postID) ));
}
...
JS:
...
success: function (response) {
if ("success" == response.pinned) {
console.log('Pin master response : success');
} else {
console.log('Pin master response : failure');
}
},
error: function (response) {
console.log('Error master response : ' , response);
}
...