Merge pull request #21769 from nishitlangaliya/issue-21765
fix: Manually adding fee on order generate html code
This commit is contained in:
commit
b551f57173
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue