Merge pull request #21769 from nishitlangaliya/issue-21765

fix: Manually adding fee on order generate html code
This commit is contained in:
Claudiu Lodromanean 2018-11-05 15:27:33 -05:00 committed by GitHub
commit b551f57173
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -944,7 +944,7 @@ class WC_AJAX {
$fee = new WC_Order_Item_Fee();
$fee->set_amount( $amount );
$fee->set_total( $amount );
$fee->set_name( sprintf( __( '%s fee', 'woocommerce' ), $formatted_amount ) );
$fee->set_name( sprintf( __( '%s fee', 'woocommerce' ), wc_clean( $formatted_amount ) ) );
$order->add_item( $fee );
$order->calculate_taxes( $calculate_tax_args );