woocommerce_payment_complete хук-событиеWC 1.0

Использование

add_action( 'woocommerce_payment_complete', 'wp_kama_woocommerce_payment_complete_action', 10, 2 );

/**
 * Function for `woocommerce_payment_complete` action-hook.
 * 
 * @param  $id             
 * @param  $transaction_id 
 *
 * @return void
 */
function wp_kama_woocommerce_payment_complete_action( $id, $transaction_id ){

	// action...
}
$id
-
$transaction_id
-

Где вызывается хук

WC_Order::payment_complete()
woocommerce_payment_complete
woocommerce/includes/class-wc-order.php 145
do_action( 'woocommerce_payment_complete', $this->get_id(), $transaction_id );

Где используется хук в WooCommerce

woocommerce/includes/wc-stock-functions.php 112
add_action( 'woocommerce_payment_complete', 'wc_maybe_reduce_stock_levels' );
woocommerce/includes/wc-stock-functions.php 384
add_action( 'woocommerce_payment_complete', 'wc_release_stock_for_order', 11 );
woocommerce/includes/wc-user-functions.php 302
add_action( 'woocommerce_payment_complete', 'wc_paying_customer' );