WordPress Affiliate Manager

Affiliates Management Plugin for WordPress

  • Home
  • Features
    • Screen Shots
  • Download
  • Documentation
  • Addons
  • Support
    • Support Forum
    • Forum Login
    • Forum Registration
    • Contact
    • Premium Addon/Plugin Support

[Resolved] Commission is applied after Coupon Discount?

by

WordPress Affiliate Manager › Forums › Affiliate Manager Plugin › Commission is applied after Coupon Discount?

Tagged: comission, discount, subtotal, total

  • This topic has 2 replies, 2 voices, and was last updated 5 years, 4 months ago by Nexusway.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 14, 2020 at 12:46 pm #6620
    Nexusway
    Participant

    Hi, my understanding was that the plugin applied the commission rate on the subtotal, excluding tax, shipping etc and also on the Discount.
    Everything works great, but my $35 item which has a 20% discount applied to $27 with no tax added no shipping etc,
    I expected to see the 20% commission applied to the $35, not the $27.
    Log : Credit for sale of 27 USD (PURCHASE LOG ID = 3295)
    I expected $35.
    Standard WooCommerce Coupon in use applied at the Checkout, simple Stripe Payment.
    How can I modify so I get the $object->get_subtotal() instead of $object->get_total() from WC Cart?

    Thanks
    David

    March 15, 2020 at 3:18 am #6621
    Shadow Labs
    Keymaster

    @Nexusway, I’m not sure what you are asking for.

    Hi, my understanding was that the plugin applied the commission rate on the subtotal, excluding tax, shipping etc and also on the Discount.

    – That’s what it’s doing.

    I expected to see the 20% commission applied to the $35, not the $27.

    – Do you want the commission to be applied to $35 or just want to show that amount as the sale amount?

    March 15, 2020 at 3:57 am #6622
    Nexusway
    Participant

    I edited wp-content/plugins/affiliates-manager/source/Plugin.php
    on line 489 to reflect
    $total = $order->get_subtotal();
    versus
    $total = $order->get_total();

    and commented out the remainder of
    $purchaseAmount = $total; // – $shipping – $tax – $fees;
    on line 494

    And now it does what I wanted,

    Thanks !!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Featured Addons

  • WooCommerce Coupon Tracking
  • WooCommerce Product Specific Commission

Copyright © 2025 | WordPress Affiliate Manager | Privacy Policy