Merged in feature/MAW-855-import-code-into-aws (pull request #2)

code import from pantheon

* code import from pantheon
This commit is contained in:
Tony Volpe
2023-12-04 23:08:14 +00:00
parent 8c9b1312bc
commit 8f4b5efda6
4766 changed files with 185592 additions and 239967 deletions

View File

@@ -619,22 +619,7 @@ class WC_API_Server {
* @return string
*/
public function get_raw_data() {
// @codingStandardsIgnoreStart
// $HTTP_RAW_POST_DATA is deprecated on PHP 5.6.
if ( function_exists( 'phpversion' ) && version_compare( phpversion(), '5.6', '>=' ) ) {
return file_get_contents( 'php://input' );
}
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;
// @codingStandardsIgnoreEnd
return file_get_contents( 'php://input' );
}
/**

View File

@@ -761,7 +761,7 @@ class WC_API_Orders extends WC_API_Resource {
*
* @param WC_Order $order
* @param array $posted
* @param string $type
* @param string $type Type of address; 'billing' or 'shipping'.
*/
protected function update_address( $order, $posted, $type = 'billing' ) {
foreach ( $posted as $key => $value ) {

View File

@@ -656,22 +656,7 @@ class WC_API_Server {
* @return string
*/
public function get_raw_data() {
// @codingStandardsIgnoreStart
// $HTTP_RAW_POST_DATA is deprecated on PHP 5.6.
if ( function_exists( 'phpversion' ) && version_compare( phpversion(), '5.6', '>=' ) ) {
return file_get_contents( 'php://input' );
}
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;
// @codingStandardsIgnoreEnd
return file_get_contents( 'php://input' );
}
/**

View File

@@ -805,7 +805,7 @@ class WC_API_Orders extends WC_API_Resource {
*
* @param WC_Order $order
* @param array $posted
* @param string $type
* @param string $type Type of address; 'billing' or 'shipping'.
*/
protected function update_address( $order, $posted, $type = 'billing' ) {
foreach ( $posted as $key => $value ) {

View File

@@ -658,22 +658,7 @@ class WC_API_Server {
* @return string
*/
public function get_raw_data() {
// @codingStandardsIgnoreStart
// $HTTP_RAW_POST_DATA is deprecated on PHP 5.6.
if ( function_exists( 'phpversion' ) && version_compare( phpversion(), '5.6', '>=' ) ) {
return file_get_contents( 'php://input' );
}
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;
// @codingStandardsIgnoreEnd
return file_get_contents( 'php://input' );
}
/**