Changeset 2859112
- Timestamp:
- 02/02/2023 04:56:09 PM (3 years ago)
- Location:
- cryptapi-payment-gateway-for-woocommerce
- Files:
-
- 6 edited
- 7 copied
-
tags/4.7.2 (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk)
-
tags/4.7.2/CryptAPI.php (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/CryptAPI.php) (1 diff)
-
tags/4.7.2/README.md (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/README.md) (1 diff)
-
tags/4.7.2/controllers/CryptAPI.php (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/controllers/CryptAPI.php) (1 diff)
-
tags/4.7.2/define.php (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/define.php)
-
tags/4.7.2/readme.txt (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/readme.txt) (2 diffs)
-
tags/4.7.2/static/payment.js (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/static/payment.js)
-
tags/4.7.2/utils/helper.php (modified) (1 diff)
-
trunk/CryptAPI.php (modified) (1 diff)
-
trunk/README.md (modified) (1 diff)
-
trunk/controllers/CryptAPI.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/utils/helper.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cryptapi-payment-gateway-for-woocommerce/tags/4.7.2/CryptAPI.php
r2849231 r2859112 4 4 Plugin URI: https://github.com/cryptapi/woocommerce-cryptapi 5 5 Description: Accept cryptocurrency payments on your WooCommerce website 6 Version: 4.7. 16 Version: 4.7.2 7 7 Requires at least: 5 8 8 Tested up to: 6.1.1 -
cryptapi-payment-gateway-for-woocommerce/tags/4.7.2/README.md
r2849231 r2859112 310 310 * Improvements on the callback processing algorithm 311 311 312 #### 4.7.2 313 * Minor fixes 314 312 315 ### Upgrade Notice 313 316 #### 4.3 -
cryptapi-payment-gateway-for-woocommerce/tags/4.7.2/controllers/CryptAPI.php
r2849231 r2859112 1334 1334 } 1335 1335 1336 $total_fee = $this->get_option( 'fee_order_percentage' ) == 'none' ? 0 : $this->get_option( 'fee_order_percentage' ); 1337 1338 $fee_order = WC()->cart->subtotal * $total_fee; 1339 1340 if ( $total_fee !== 'none' || $this->add_blockchain_fee ) { 1336 $total_fee = $this->get_option( 'fee_order_percentage' ) === 'none' ? 0 : (float) $this->get_option( 'fee_order_percentage' ); 1337 1338 $fee_order = 0; 1339 1340 if ( $total_fee !== 0 || $this->add_blockchain_fee ) { 1341 1342 if ($total_fee !== 0) { 1343 $fee_order = (float) WC()->cart->subtotal * $total_fee; 1344 } 1341 1345 1342 1346 $selected = WC()->session->get( 'cryptapi_coin' ); -
cryptapi-payment-gateway-for-woocommerce/tags/4.7.2/readme.txt
r2849231 r2859112 4 4 Requires at least: 5 5 5 Tested up to: 6.1.1 6 Stable tag: 4.7. 16 Stable tag: 4.7.2 7 7 Requires PHP: 7.2 8 8 WC requires at least: 5.8 … … 319 319 * Minor fixes 320 320 321 = 4.7.2 = 322 * Minor fixes 323 321 324 == Upgrade Notice == 322 325 -
cryptapi-payment-gateway-for-woocommerce/tags/4.7.2/utils/helper.php
r2789271 r2859112 254 254 public static function sig_fig($value, $digits) 255 255 { 256 if ($value == 0) { 257 $decimalPlaces = $digits - 1; 258 } elseif ($value < 0) { 259 $decimalPlaces = $digits - floor(log10($value * -1)) - 1; 260 } else { 261 $decimalPlaces = $digits - floor(log10($value)) - 1; 262 } 263 264 $answer = ($decimalPlaces > 0) ? 265 number_format($value, $decimalPlaces, '.', '') : round($value, $decimalPlaces); 266 return $answer; 256 if (strpos((string) $value, '.') !== false) { 257 if ($value[0] != '-') { 258 return bcadd($value, '0.' . str_repeat('0', $digits) . '5', $digits); 259 } 260 261 return bcsub($value, '0.' . str_repeat('0', $digits) . '5', $digits); 262 } 263 264 return $value; 267 265 } 268 266 -
cryptapi-payment-gateway-for-woocommerce/trunk/CryptAPI.php
r2849231 r2859112 4 4 Plugin URI: https://github.com/cryptapi/woocommerce-cryptapi 5 5 Description: Accept cryptocurrency payments on your WooCommerce website 6 Version: 4.7. 16 Version: 4.7.2 7 7 Requires at least: 5 8 8 Tested up to: 6.1.1 -
cryptapi-payment-gateway-for-woocommerce/trunk/README.md
r2849231 r2859112 310 310 * Improvements on the callback processing algorithm 311 311 312 #### 4.7.2 313 * Minor fixes 314 312 315 ### Upgrade Notice 313 316 #### 4.3 -
cryptapi-payment-gateway-for-woocommerce/trunk/controllers/CryptAPI.php
r2849231 r2859112 1334 1334 } 1335 1335 1336 $total_fee = $this->get_option( 'fee_order_percentage' ) == 'none' ? 0 : $this->get_option( 'fee_order_percentage' ); 1337 1338 $fee_order = WC()->cart->subtotal * $total_fee; 1339 1340 if ( $total_fee !== 'none' || $this->add_blockchain_fee ) { 1336 $total_fee = $this->get_option( 'fee_order_percentage' ) === 'none' ? 0 : (float) $this->get_option( 'fee_order_percentage' ); 1337 1338 $fee_order = 0; 1339 1340 if ( $total_fee !== 0 || $this->add_blockchain_fee ) { 1341 1342 if ($total_fee !== 0) { 1343 $fee_order = (float) WC()->cart->subtotal * $total_fee; 1344 } 1341 1345 1342 1346 $selected = WC()->session->get( 'cryptapi_coin' ); -
cryptapi-payment-gateway-for-woocommerce/trunk/readme.txt
r2849231 r2859112 4 4 Requires at least: 5 5 5 Tested up to: 6.1.1 6 Stable tag: 4.7. 16 Stable tag: 4.7.2 7 7 Requires PHP: 7.2 8 8 WC requires at least: 5.8 … … 319 319 * Minor fixes 320 320 321 = 4.7.2 = 322 * Minor fixes 323 321 324 == Upgrade Notice == 322 325 -
cryptapi-payment-gateway-for-woocommerce/trunk/utils/helper.php
r2789271 r2859112 254 254 public static function sig_fig($value, $digits) 255 255 { 256 if ($value == 0) { 257 $decimalPlaces = $digits - 1; 258 } elseif ($value < 0) { 259 $decimalPlaces = $digits - floor(log10($value * -1)) - 1; 260 } else { 261 $decimalPlaces = $digits - floor(log10($value)) - 1; 262 } 263 264 $answer = ($decimalPlaces > 0) ? 265 number_format($value, $decimalPlaces, '.', '') : round($value, $decimalPlaces); 266 return $answer; 256 if (strpos((string) $value, '.') !== false) { 257 if ($value[0] != '-') { 258 return bcadd($value, '0.' . str_repeat('0', $digits) . '5', $digits); 259 } 260 261 return bcsub($value, '0.' . str_repeat('0', $digits) . '5', $digits); 262 } 263 264 return $value; 267 265 } 268 266
Note: See TracChangeset
for help on using the changeset viewer.