• Resolved jlugros

    (@jlugros)


    Pergunta em português mais abaixo

    Hi,
    There is the add_fee function/class, in Woocommerce,
    which allows adding a custom fee to the order
    with the following command:

    $woocommerce->cart->add_fee( $fee_name, $fee_value, true, ” );

    But how can we remove a fee?
    As far as I have searched there is no remove_fee function whatsoever.

    In my case, I’m adding a custom negative fee (a discount) for payments at sight.

    But if the user chooses to pay with credit card in multiple installments, I would need to remove this negative fee before payment is processed or on the thank you page.

    Any clue on how to do this?

    Thanks
    Jeremy

    Olá,
    Existe a fun??o/classe add_fee no Woocommerce, que permite adicionar uma taxa/fee customizada ao pedido com o seguinte comando:

    $woocommerce->cart->add_fee( $fee_name, $fee_value, true, ” );

    Mas como fazer pra remover um fee?
    Até onde pesquisei n?o existe nenhuma fun??o remove_fee.

    No meu caso, estou adicionando uma taxa negativa (para simular um desconto) em pagamentos à vista.

    Mas se o usuário escolher pagar com cart?o de crédito parcelado, eu precisaria remover esta taxa negativa / desconto antes do pagamento ser processado ou na página de recibo / thankyou.

    Alguma ideia de como fazer isto?

    Obrigado
    Jeremy

    https://www.ads-software.com/plugins/woocommerce/

Viewing 1 replies (of 1 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    fees is public; you’d have to unset it. But fees are added per page load, so just not adding it may work.

Viewing 1 replies (of 1 total)
  • The topic ‘How to remove fee (contrary to add_fee) / Como remover um fee’ is closed to new replies.