• Resolved gmo81

    (@gmo81)


    Hi there,

    it appears discounts are not applied, if there has already been some other discount given (for a custom order, if we apply a discounted price for line items, the additional discount by payment method does not change anything – no additional discount is applied).

    Could you advise how we can make this discount apply on top of any existing discounts in play on an order?

    Cheers,

    GMO

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter gmo81

    (@gmo81)

    Actually – checking further, it’s whenever there is an order created by an administrator and assigned to an account.

    ie. At the backend of WordPress, go to WooCommerce -> Orders -> Add order.

    Add some product, calc taxes, calc total, assign to someone’s account (put in the customer name), and save the order.

    Login as that person, go to ‘orders’, click on ‘pay’, then at checkout, select a payment method that should have a discount applied.

    This plugin does not apply a discount by payment method in this instance.

    Any ideas on how we can fix this?

    GMO

    • This reply was modified 7 years, 9 months ago by gmo81.
    • This reply was modified 7 years, 9 months ago by gmo81.
    Thread Starter gmo81

    (@gmo81)

    On further investigation – it may be the case that calculate_fees() is required to fire, but I am not sure that it does when an ‘order’ is being paid vs a ‘cart’ of items.

    See: https://docs.woocommerce.com/wc-apidocs/class-WC_Cart.html

    calculate_fees() method seems to allow for developers to calculate fees at checkout.

    However, ‘order’ doesn’t seem to have any such method –
    see: https://docs.woocommerce.com/wc-apidocs/class-WC_Order.html

    I am interested to know if ultimately this is the root cause, as it seems multiple plugins would rely on calculate_fees() firing, to be able to do things like calculate a fee / discount at checkout, or other fees based on certain characteristics.

    If this is true, perhaps this really means there is a fundamental issue in WooCommerce. If so.. any ideas on how we could get this sorted?

    GMO

    Plugin Author Claudio Sanches

    (@claudiosanches)

    Actually – checking further, it’s whenever there is an order created by an administrator and assigned to an account.

    ie. At the backend of WordPress, go to WooCommerce -> Orders -> Add order.

    This plugins applies only in the cart flow, if you are creating a manual order, you can already give a discount manually.

    Thread Starter gmo81

    (@gmo81)

    Yes, you can give a discount manually – but the whole point is the plugin is supposed to discount based on payment method.

    You cannot know for sure what that payment method is, for certain, it is a user decision.

    I raised this as I discovered through looking through the code that this is really a fundamental woocommerce issue.

    The issue was closed as there is another epic issue raised that plans on making changes woocommerce’s behaviour to the “order” workflow, so checkout is the same whether it be my cart or by order. It was scheduled for 2.7, then for 3.0, then 2.7 and now 3.0 again.

    So I’m guessing we are not going to see this fixed for a while unfortunately.

    Plugin Author Claudio Sanches

    (@claudiosanches)

    @gmo81 yes, the problem is that not even WooCommerce applies discounts while editing an order in the admin. Need to be improved first on WooCommerce and then will be possible does the same here.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Discount not applied when another discount already exists’ is closed to new replies.