Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/woocomme.../src/Admin/API/Reports
File: ExportableTraits.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* REST API Reports exportable traits
[2] Fix | Delete
*
[3] Fix | Delete
* Collection of utility methods for exportable reports.
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
namespace Automattic\WooCommerce\Admin\API\Reports;
[7] Fix | Delete
[8] Fix | Delete
defined( 'ABSPATH' ) || exit;
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* ExportableTraits class.
[12] Fix | Delete
*/
[13] Fix | Delete
trait ExportableTraits {
[14] Fix | Delete
/**
[15] Fix | Delete
* Format numbers for CSV using store precision setting.
[16] Fix | Delete
*
[17] Fix | Delete
* @param string|float $value Numeric value.
[18] Fix | Delete
* @return string Formatted value.
[19] Fix | Delete
*/
[20] Fix | Delete
public static function csv_number_format( $value ) {
[21] Fix | Delete
$decimals = wc_get_price_decimals();
[22] Fix | Delete
// See: @woocommerce/currency: getCurrencyFormatDecimal().
[23] Fix | Delete
return number_format( $value, $decimals, '.', '' );
[24] Fix | Delete
}
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function