Created
June 25, 2021 16:33
-
-
Save vanbo/b5f0cb555f9bb04d71f98025071a315c to your computer and use it in GitHub Desktop.
WC Paytrace: set order to processing after capture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wc_paytrace_capture_approved_response_processed', 'vanbodevelops_set_order_processing_after_capture', 10, 3 ); | |
/** | |
* @param $response | |
* @param \WC_Order $order | |
* @param $amount | |
*/ | |
function vanbodevelops_set_order_processing_after_capture( $response, $order, $amount ) { | |
// It's our gateway | |
if ( 'paytrace' != $order->get_payment_method() ) { | |
return; | |
} | |
$order->update_status( 'processing' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment