• Resolved realfufu

    (@realfufu)


    Hi Community

    I have to create a new payment method.
    The admin can configure for this a extra fee (but he/she don’t have to).
    This Fee is a flat value or a percentage of the order total.

    Now I tried a bit, but I don’t get a good solution for it.
    Did someone already did something or know how to do this?

    It’s kind of problematic, cause if the payment is selected the table with the items, taxes has now to display an additional item and a new total. If an other payment gets selected the changes has to get undone.

    regards

    FuFu

    #plzHelp

    https://ww.wp.xz.cn/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Riaan K.

    (@riaanknoetze)

    Have you tried using Payment Gateway Fees extension?

    Thread Starter realfufu

    (@realfufu)

    Thanks Riaan for your answer.
    I didn’t know that extension.

    But I would like to have this functionality without an additional extension, cause I already develop an extension for an extension, I don’t want that it requires an additional extension.

    But if I don’t find another solution I may fall back to this.

    Thread Starter realfufu

    (@realfufu)

    And I found something.
    It’s very easy. I were just to sleepy yesterday.

    Solution:
    In the file abstract-wc-order.php of woocommerce exists the method add_fee.
    Easy.

    Thanks Riaan for your time.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WooCommerce – Custom payment method with dynamically extra fee’ is closed to new replies.