[API] Removed $HTTP_RAW_POST_DATA in favor of php://input, closes #8848
This commit is contained in:
parent
a5a7c71aa7
commit
a12552dbf1
|
@ -646,15 +646,7 @@ class WC_API_Server {
|
|||
* @return string
|
||||
*/
|
||||
public function get_raw_data() {
|
||||
global $HTTP_RAW_POST_DATA;
|
||||
|
||||
// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
|
||||
// but we can do it ourself.
|
||||
if ( ! isset( $HTTP_RAW_POST_DATA ) ) {
|
||||
$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
|
||||
}
|
||||
|
||||
return $HTTP_RAW_POST_DATA;
|
||||
return file_get_contents( 'php://input' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -609,15 +609,7 @@ class WC_API_Server {
|
|||
* @return string
|
||||
*/
|
||||
public function get_raw_data() {
|
||||
global $HTTP_RAW_POST_DATA;
|
||||
|
||||
// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
|
||||
// but we can do it ourself.
|
||||
if ( !isset( $HTTP_RAW_POST_DATA ) ) {
|
||||
$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
|
||||
}
|
||||
|
||||
return $HTTP_RAW_POST_DATA;
|
||||
return file_get_contents( 'php://input' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -646,15 +646,7 @@ class WC_API_Server {
|
|||
* @return string
|
||||
*/
|
||||
public function get_raw_data() {
|
||||
global $HTTP_RAW_POST_DATA;
|
||||
|
||||
// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
|
||||
// but we can do it ourself.
|
||||
if ( ! isset( $HTTP_RAW_POST_DATA ) ) {
|
||||
$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
|
||||
}
|
||||
|
||||
return $HTTP_RAW_POST_DATA;
|
||||
return file_get_contents( 'php://input' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -163,6 +163,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Fix - save_account_details should check display name of current user.
|
||||
* Tweak - Allowed Zip/Post Codes description for Local Delivery.
|
||||
* Tweak - Improve display_item_downloads numbering and use same function in emails.
|
||||
* Tweak - API - Removed `$HTTP_RAW_POST_DATA` in favor of `php://input` for accept POST/PUT data.
|
||||
|
||||
= 2.4.4 - 14/08/2015 =
|
||||
* Fix - Ajax variation handling when 'any' attribute is set.
|
||||
|
|
Loading…
Reference in New Issue