| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | * Charitable Currency helper. |
| 4 | 4 | * |
| 5 | 5 | * @package Charitable/Classes/Charitable_Currency |
| 6 | 6 | * @author David Bisset |
| 7 | - * @copyright Copyright (c) 2022, WP Charitable LLC | |
| 7 | + * @copyright Copyright (c) 2023, WP Charitable LLC | |
| 8 | 8 | * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 9 | 9 | * @since 1.0.0 |
| 10 | 10 | * @version 1.6.55 |
| 11 | 11 | */ |
| @@ -202,8 +202,13 @@ | ||
| 202 | 202 | * @param string $amount The amount to be cast to decimal format. |
| 203 | 203 | * @return string |
| 204 | 204 | */ |
| 205 | 205 | public function cast_to_decimal_format( $amount ) { |
| 206 | + | |
| 207 | + if ( is_wp_error( $amount ) ) { | |
| 208 | + return $amount; | |
| 209 | + } | |
| 210 | + | |
| 206 | 211 | if ( $this->is_comma_decimal() ) { |
| 207 | 212 | $amount = str_replace( ',', '.', $amount ); |
| 208 | 213 | } else { |
| 209 | 214 | $amount = str_replace( ',', '', $amount ); |
| @@ -375,9 +380,9 @@ | ||
| 375 | 380 | $this->get_currency_symbol( 'CNY' ) |
| 376 | 381 | ), |
| 377 | 382 | 'COP' => sprintf( |
| 378 | 383 | /* translators: %s: currency symbol */ |
| 379 | - __( 'Colombian Peso (%s', 'charitable' ), | |
| 384 | + __( 'Colombian Peso (%s)', 'charitable' ), | |
| 380 | 385 | $this->get_currency_symbol( 'COP' ) |
| 381 | 386 | ), |
| 382 | 387 | 'CZK' => sprintf( |
| 383 | 388 | /* translators: %s: currency symbol */ |