Skip to content

Commit

Permalink
Merge pull request #4 from upsellpl/sanitize-amount-filter
Browse files Browse the repository at this point in the history
Removed WPI coupling, added amount filter
  • Loading branch information
upsellpl committed Feb 3, 2021
2 parents 0449fef + a0c6dc9 commit 080938e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions includes/formatting.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* @since 1.2
*/

use bpmj\wpidea\wolverine\system\System;

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;

Expand All @@ -28,8 +26,7 @@ function edd_sanitize_amount( $amount ) {
$thousands_sep = edd_get_option( 'thousands_separator', '' );
$decimal_sep = edd_get_option( 'decimal_separator', '.' );

if ( System::isDecimalPointComma() )
$amount = str_replace( ',', '.', $amount );
$amount = apply_filters( 'edd_sanitize_amount_amount', $amount );

// Sanitize the amount
if ( $decimal_sep == ',' && false !== ( $found = strpos( $amount, $decimal_sep ) ) ) {
Expand Down

0 comments on commit 080938e

Please sign in to comment.