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

@@ -631,8 +631,8 @@ function get_woocommerce_currencies() {
'USD' => __( 'United States (US) dollar', 'woocommerce' ),
'UYU' => __( 'Uruguayan peso', 'woocommerce' ),
'UZS' => __( 'Uzbekistani som', 'woocommerce' ),
'VEF' => __( 'Venezuelan bolívar', 'woocommerce' ),
'VES' => __( 'Bolívar soberano', 'woocommerce' ),
'VEF' => __( 'Venezuelan bolívar (20082018)', 'woocommerce' ),
'VES' => __( 'Venezuelan bolívar', 'woocommerce' ),
'VND' => __( 'Vietnamese đồng', 'woocommerce' ),
'VUV' => __( 'Vanuatu vatu', 'woocommerce' ),
'WST' => __( 'Samoan tālā', 'woocommerce' ),
@@ -817,7 +817,7 @@ function get_woocommerce_currency_symbols() {
'UYU' => '$',
'UZS' => 'UZS',
'VEF' => 'Bs F',
'VES' => 'Bs.S',
'VES' => 'Bs.',
'VND' => '₫',
'VUV' => 'Vt',
'WST' => 'T',
@@ -1094,11 +1094,7 @@ function wc_setcookie( $name, $value, $expire = 0, $secure = false, $httponly =
$value
);
if ( version_compare( PHP_VERSION, '7.3.0', '>=' ) ) {
setcookie( $name, $value, $options );
} else {
setcookie( $name, $value, $options['expires'], $options['path'], $options['domain'], $options['secure'], $options['httponly'] );
}
setcookie( $name, $value, $options );
} elseif ( Constants::is_true( 'WP_DEBUG' ) ) {
headers_sent( $file, $line );
trigger_error( "{$name} cookie cannot be set - headers already sent by {$file} on line {$line}", E_USER_NOTICE ); // @codingStandardsIgnoreLine
@@ -2507,15 +2503,7 @@ function wc_decimal_to_fraction( $decimal ) {
* @return float
*/
function wc_round_discount( $value, $precision ) {
if ( version_compare( PHP_VERSION, '5.3.0', '>=' ) ) {
return NumberUtil::round( $value, $precision, WC_DISCOUNT_ROUNDING_MODE ); // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctionParameters.round_modeFound
}
if ( PHP_ROUND_HALF_DOWN === WC_DISCOUNT_ROUNDING_MODE ) {
return wc_legacy_round_half_down( $value, $precision );
}
return NumberUtil::round( $value, $precision );
return NumberUtil::round( $value, $precision, WC_DISCOUNT_ROUNDING_MODE ); // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctionParameters.round_modeFound
}
/**
@@ -2544,7 +2532,7 @@ function wc_selected( $value, $options ) {
function wc_get_server_database_version() {
global $wpdb;
if ( empty( $wpdb->is_mysql ) || ! $wpdb->use_mysqli ) {
if ( empty( $wpdb->is_mysql ) || empty( $wpdb->use_mysqli ) ) {
return array(
'string' => '',
'number' => '',