woocommerce_thankyou_order_id │ хук-фильтр │ WC 2.0.0

Filters the ID of the order shown on the thanks page.

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

add_filter( 'woocommerce_thankyou_order_id', 'wp_kama_woocommerce_thankyou_order_id_filter' );

/**
 * Function for `woocommerce_thankyou_order_id` filter-hook.
 * 
 * @param int $order_id The order ID resolved from the request.
 *
 * @return int
 */
function wp_kama_woocommerce_thankyou_order_id_filter( $order_id ){
	// filter...
	return $order_id;
}
$order_id(int)
The order ID resolved from the request.

Список изменений

С версии 2.0.0 Введена.

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

WC_Shortcode_Checkout::order_received()
woocommerce_thankyou_order_id
WC_Gateway_Paypal_PDT_Handler::check_response()
woocommerce_thankyou_order_id
woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php 274
$order_id = apply_filters( 'woocommerce_thankyou_order_id', absint( $order_id ) );
woocommerce/includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php 109
$order_id = apply_filters( 'woocommerce_thankyou_order_id', absint( $wp->query_vars['order-received'] ) );

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

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