Changeset 2057 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/class-list-table.php
- Timestamp:
- 11/09/2015 10:16:48 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/class-list-table.php
r2036 r2057 172 172 $amount = get_post_meta( $request->ID, '_camppayments_payment_amount', true ); 173 173 174 $amount = preg_replace( '#[^\d.-]+#', '', $amount ); 175 $amount = floatval( $amount ); 176 174 177 if ( strpos( $currency, 'null' ) === false && $amount ) { 175 return sprintf( '%s %s', esc_html( $amount ), esc_html( $currency ) ); 178 $output = sprintf( '%s %s', esc_html( number_format( $amount, 2 ) ), esc_html( $currency ) ); 179 180 if ( $currency != 'USD' ) { 181 $usd_amount = WordCamp_Payments_Network_Tools::convert_currency( $currency, 'usd', $amount ); 182 if ( $usd_amount ) 183 $output .= sprintf( '<br />~ %s USD', esc_html( number_format( $usd_amount, 2 ) ) ); 184 } 185 186 return $output; 176 187 } elseif ( $amount ) { 177 188 return esc_html( $amount );
Note: See TracChangeset
for help on using the changeset viewer.