skip to Main Content

WooCommerce: Allow HTML tags in "add_fee function" label

I'm using the following code to add a custom fee based on payment method: function stackoverflow_apply_payment_gateway_fee() { $payment_method = WC()->session->get( 'chosen_payment_method' ); if( $payment_method == 'paypal' ) { $label = 'PayPal Fee <span>HTML</span>'; $cart_subtotal_fee = WC()->cart->get_subtotal(); $amount = 5; WC()->cart->add_fee(…

VIEW QUESTION
Back To Top
Search