@Christian- Thanks a lot for the applaud. Can you please check the order status for the purchase from the admin back-end. Commission is generated only when the order is paid. The way it recognises the payment is the order status- this has to be processing or completed. If you use COD payment method, it is automatically in the processing state.
If you see the order in pending payment or on-hold payment state, kindly change it to processing and let me know if that fixes the problem?
Looking forward to your response.
Regards,
Sandeep
Thanks Sandeep. You were right, the orders were pending and as soon as I completed the orders, the commissions were generated.
I do have another question though. I’m thinking of developing a WC Marketplace integration for AffiliateWP and AffiliateWP MLM. Can you tell me what the priority is, for the function that generates the vendor commission during WooCommerce Checkout? That is, the function that is hooked into the woocommerce_order_status_completed action.
Glad to be of help Christian 🙂
Coming to the functions related to the commission, it’s not just one function but a combination of many so I am rather sharing the files which play deciding roles here-
(1) dc-woocommerce-multi-vendor/classes/class-wcmp-calculate-commission.php
(2) dc-woocommerce-multi-vendor/classes/class-wcmp-post-commission.php
(3) dc-woocommerce-multi-vendor/classes/class-wcmp-vendor-details.php
Hope that helps.
Regards,
Sandeep