Issue with Handling Custom Fee in ‘woocommerce_cart_totals_fee_html’ Filter
-
public function wsfw_wallet_cart_totals_fee_html( $cart_totals_fee_html, $fees ) { foreach ( $fees as $key => $fee ) { if ( 'via_wallet_partial_payment' == $fee ) { // gets the data to recalculate the cart total. $cart_totals_fee_html = $fees->amount; return wc_price( $cart_totals_fee_html ); break; } } return wc_price( $fees ); }
Hello,
It seems this function is not properly handling all cases.
In my case the $fees was a object of typestdClass
with properties likeid
,name
,amount
, etc. This structure doesn’t seem to align with the way the function iterates over$fees
.
Can you please look into it.
Kind regards
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Issue with Handling Custom Fee in ‘woocommerce_cart_totals_fee_html’ Filter’ is closed to new replies.