woocommerce_cart_no_shipping_available_html
Provides a means of overriding the default 'no shipping available' HTML string.
Usage
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(string)
- HTML message.
- $formatted_destination(string)
- The formatted shipping destination.
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
In file: /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 )