✏️ 正在编辑: ExportableTraits.php
路径:
/home/h359620/public_html/wp-content/plugins/woocommerce/src/Admin/API/Reports/ExportableTraits.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php /** * REST API Reports exportable traits * * Collection of utility methods for exportable reports. */ namespace Automattic\WooCommerce\Admin\API\Reports; defined( 'ABSPATH' ) || exit; /** * ExportableTraits class. */ trait ExportableTraits { /** * Format numbers for CSV using store precision setting. * * @param string|float $value Numeric value. * @return string Formatted value. */ public static function csv_number_format( $value ) { $decimals = wc_get_price_decimals(); // See: @woocommerce/currency: getCurrencyFormatDecimal(). return number_format( $value, $decimals, '.', '' ); } }
💾 保存文件
← 返回文件管理器