Affiliates not getting commission in manual order change

@Barry asked me to create a new thread from so here it is.

This was my original message:

If it is the Debits / Credits / Payments then they are not recording the purchases made when someone buys via the affiliate link.

Marketpress 2.6.4 and Affiliates 3.0.4

I’ve got Marketpress configured for manual payments. The affiliates are not credited when the order is manually changed from received to paid.

Affiliate is attaching the computing of payouts in the mp_order_paid and while it works when we’re passing through the gateway, it doesn’t work when we’re changing the order state manually.

The fix is actually on the Marketpress side. Essentially, when we’re changing between order status, the actions ‘mp_order_paid’ and friends aren’t being called.

Calling do_action inside the appropriate states in function update_order_status($order_id, $new_status) (line 3305, marketpress/marketpress.php) fixes the issue.

I’m attaching a git patch of the fix I made.

Hope it helps.

PS. Looking through other support tickets, I understand that what I’m doing (fixing things myself) isn’t the norm. I figured that since the plugins are GPL anyway and I’ve got the requisite skills to make the changes myself, might as well fix it up to help @Barry out a bit. (He’s pretty in demand in all of the threads I’ve looked at.)