Skip to content
Permalink
Browse files

fix global $HTTP_RAW_POST_DATA

  • Loading branch information...
kilbot committed Jun 4, 2015
1 parent d800d40 commit ac88f502a86d60eb9de4f8f63a224f632db72e7f
Showing with 2 additions and 2 deletions.
  1. +2 −2 includes/class-wc-pos-ajax.php
@@ -257,9 +257,9 @@ static private function error_to_array( $error ) {
private function get_raw_data() {
global $HTTP_RAW_POST_DATA;
if ( !isset( $HTTP_RAW_POST_DATA ) ) {
$HTTP_RAW_POST_DATA = json_decode(trim(file_get_contents('php://input')), true);
$HTTP_RAW_POST_DATA = trim(file_get_contents('php://input'));
}
return $HTTP_RAW_POST_DATA;
return json_decode( $HTTP_RAW_POST_DATA, true);
}
}

0 comments on commit ac88f50

Please sign in to comment.
You can’t perform that action at this time.