Action: tcp checkout end

Description

“tcp_checkout_end” action is executed at the end of the checkout process.

Parameters

$order_id
(Number) Identifier of the new Order.
$ok
(Boolean, since 1.2.5.1) True if checkout (usually payment) was ok, false in other case.

Example

<?php
function my_tcp_checkout_end( $order_id, $ok ) {
	$completed = tcp_get_completed_order_status();
	if ( $completed == Orders::getStatus( $order_id ) && $ok) {
		...
	}
}
add_action( 'tcp_checkout_end', 'my_tcp_checkout_end', 10, 2 ); ?>

Change Log

Since 1.0.5
Since 1.1.7 the function is called when the checkout process ends Ok or Ko