Exclude Woo Fees from subscription commision calculation
-
Hi. I’m using WPAM with Woo commerce subscriptions. I have some product subscriptions where we add a deposit using the Woo Fees feature and I want to exclude that deposit amount from the order total that is used by WPAM to calculate the commission.
I have done some more digging and found that you do remove fees from orders (/wp-content/plugins/affiliates-manager/source/Plugin.php –
wpam_get_total_woocommerce_order_fees($order);
). However, it does not do this for Woo Subscription orders. When I turn on debug and look in the debug log (wpam-log.txt) I can see lines like this for normal orders:SUCCESS : WooCommerce Integration - Total amount: 1460.00, Total shipping: 160, Total tax: 0, Fees: 0
But the logged line for subscriptions does not include Fee info and the commission amount calculated for subscription orders includes the Fee amount.
SUCCESS : WooCommerce Subscription Integration - Order ID: 13444, Total amount: 215.00, Total shipping: 80, Total tax: 0
In my case, the fee is only applied to the initial order amount and not to recurring subs payments. Looking in your code confirms that no fees are calculated for subscriptions.
thanks, Colin
- The topic ‘Exclude Woo Fees from subscription commision calculation’ is closed to new replies.