woothemes/woocommerce — pull request #3828 by thenbrent (2013-09-25 02:52:50+00:00)
Title: Add new payment complete actions

Adds two new actions to `WC_Order::payment_complete()` method:

1. an action at the start of the function to allow extensions to modify things *before* the `payment_complete()` routine runs
1. a `'woocommerce_payment_complete_order_status_' . $order->status` action called when the `payment_complete()` function is called, but doesn't need to do anything because the order status is not 'on-hold', 'pending' or 'failed'. Some extensions do [unintended things with the standard checkout/payment flow](http://docs.woothemes.com/document/subscribers-view/#section-5), and this action will allow for it to be done in a more robust way (without imposing extra requirements on payment gateways).

I'll submit identical patch to the 2.1/master branch now.