• Resolved projoomexperts

    (@projoomexperts)


    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 type stdClass with properties like id, 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)
  • Plugin Author WP Swings

    (@wpswings)

    Hello,

    Thank you for sharing the issue,

    As per woocommerce standard, this code is correct and it is also working correctly in our wallet plugin but still, as you said in your case there might be some conflict.

    So we suggest you connect to our support team and they will help you in resolving this issue.

    Regards

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.