woocommerce_thankyou_(orderpayment_method) хук-событиеWC 1.0

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

add_action( 'woocommerce_thankyou_(orderpayment_method)', 'wp_kama_woocommerce_thankyou_orderpayment_method_action' );

/**
 * Function for `woocommerce_thankyou_(orderpayment_method)` action-hook.
 * 
 * @param  $order_id 
 *
 * @return void
 */
function wp_kama_woocommerce_thankyou_orderpayment_method_action( $order_id ){

	// action...
}
$order_id
-

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

В файле: /templates/checkout/thankyou.php
woocommerce_thankyou_(orderpayment_method)
woocommerce/templates/checkout/thankyou.php 79
<?php do_action( 'woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id() ); ?>

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

woocommerce/includes/gateways/bacs/class-wc-gateway-bacs.php 69
add_action( 'woocommerce_thankyou_bacs', array( $this, 'thankyou_page' ) );
woocommerce/includes/gateways/cheque/class-wc-gateway-cheque.php 45
add_action( 'woocommerce_thankyou_cheque', array( $this, 'thankyou_page' ) );
woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php 93
add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'order_received_text' ), 10, 2 );
woocommerce/includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php 42
add_action( 'woocommerce_thankyou_paypal', array( $this, 'check_response_for_order' ) );