woocommerce_thankyou_order_received_title хук-фильтрWC 9.6.0

Filter the title shown after a checkout is complete.

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

add_filter( 'woocommerce_thankyou_order_received_title', 'wp_kama_woocommerce_thankyou_order_received_title_filter', 10, 2 );

/**
 * Function for `woocommerce_thankyou_order_received_title` filter-hook.
 * 
 * @param string         $title The title.
 * @param WC_Order|false $order The order created during checkout, or false if order data is not available.
 *
 * @return string
 */
function wp_kama_woocommerce_thankyou_order_received_title_filter( $title, $order ){

	// filter...
	return $title;
}
$title(строка)
The title.
$order(WC_Order|false)
The order created during checkout, or false if order data is not available.

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

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

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

Status::render_content()
woocommerce_thankyou_order_received_title
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 86-90
apply_filters(
	'woocommerce_thankyou_order_received_title',
	esc_html__( 'Order cancelled', 'woocommerce' ),
	$order
)
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 104-108
apply_filters(
	'woocommerce_thankyou_order_received_title',
	esc_html__( 'Order refunded', 'woocommerce' ),
	$order
)
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 126-130
apply_filters(
	'woocommerce_thankyou_order_received_title',
	esc_html__( 'Order completed', 'woocommerce' ),
	$order
)
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 151-155
apply_filters(
	'woocommerce_thankyou_order_received_title',
	esc_html__( 'Order failed', 'woocommerce' ),
	$order
)
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 165-169
apply_filters(
	'woocommerce_thankyou_order_received_title',
	esc_html__( 'Order received', 'woocommerce' ),
	$order
)

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

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