woocommerce_cart_no_shipping_available_html хук-фильтрWC 3.0.0

Provides a means of overriding the default 'no shipping available' HTML string.

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

add_filter( 'woocommerce_cart_no_shipping_available_html', 'wp_kama_woocommerce_cart_no_shipping_available_html_filter', 10, 2 );

/**
 * Function for `woocommerce_cart_no_shipping_available_html` filter-hook.
 * 
 * @param string $html                  HTML message.
 * @param string $formatted_destination The formatted shipping destination.
 *
 * @return string
 */
function wp_kama_woocommerce_cart_no_shipping_available_html_filter( $html, $formatted_destination ){

	// filter...
	return $html;
}
$html(строка)
HTML message.
$formatted_destination(строка)
The formatted shipping destination.

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

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

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

В файле: /templates/cart/cart-shipping.php
woocommerce_cart_no_shipping_available_html
woocommerce/templates/cart/cart-shipping.php 78-83
apply_filters(
	'woocommerce_cart_no_shipping_available_html',
	// Translators: $s shipping destination.
	sprintf( esc_html__( 'No shipping options were found for %s.', 'woocommerce' ) . ' ', '<strong>' . esc_html( $formatted_destination ) . '</strong>' ),
	$formatted_destination
)

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

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