Skip to content
Snippets Groups Projects
Verified Commit 22a92877 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

feat: update template to latest woocommerce version


This template update is required to suppress any messages about outdated
woocommerce templates visible as admin notice. Such notice may push our
website elements lower causing errors in acceptance tests, which relies
on UI elements.

Signed-off-by: default avatarBart Jaskulski <bjaskulski@protonmail.com>
parent f57e62cc
Branches update-template
No related tags found
1 merge request!8feat: update template to latest woocommerce version
......@@ -13,8 +13,8 @@
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.6.0
* @package WooCommerce\Templates
* @version 7.3.0
*/
defined( 'ABSPATH' ) || exit;
......@@ -49,7 +49,7 @@ $calculator_text = '';
if ( $formatted_destination ) {
// Translators: $s shipping destination.
printf( esc_html__( 'Shipping to %s.', 'woocommerce' ) . ' ', '<strong>' . esc_html( $formatted_destination ) . '</strong>' );
$calculator_text = __( 'Change address', 'woocommerce' );
$calculator_text = esc_html__( 'Change address', 'woocommerce' );
} else {
echo wp_kses_post( apply_filters( 'woocommerce_shipping_estimate_html', __( 'Shipping options will be updated during checkout.', 'woocommerce' ) ) );
}
......@@ -58,13 +58,31 @@ $calculator_text = '';
<?php endif; ?>
<?php
elseif ( ! $has_calculated_shipping || ! $formatted_destination ) :
echo wp_kses_post( apply_filters( 'woocommerce_shipping_may_be_available_html', __( 'Enter your address to view shipping options.', 'woocommerce' ) ) );
if ( is_cart() && 'no' === get_option( 'woocommerce_enable_shipping_calc' ) ) {
echo wp_kses_post( apply_filters( 'woocommerce_shipping_not_enabled_on_cart_html', __( 'Shipping costs are calculated during checkout.', 'woocommerce' ) ) );
} else {
echo wp_kses_post( apply_filters( 'woocommerce_shipping_may_be_available_html', __( 'Enter your address to view shipping options.', 'woocommerce' ) ) );
}
elseif ( ! is_cart() ) :
echo wp_kses_post( apply_filters( 'woocommerce_no_shipping_available_html', __( 'There are no shipping options available. Please ensure that your address has been entered correctly, or contact us if you need any help.', 'woocommerce' ) ) );
else :
// Translators: $s shipping destination.
echo wp_kses_post( apply_filters( 'woocommerce_cart_no_shipping_available_html', sprintf( esc_html__( 'No shipping options were found for %s.', 'woocommerce' ) . ' ', '<strong>' . esc_html( $formatted_destination ) . '</strong>' ) ) );
$calculator_text = __( 'Enter a different address', 'woocommerce' );
echo wp_kses_post(
/**
* Provides a means of overriding the default 'no shipping available' HTML string.
*
* @since 3.0.0
*
* @param string $html HTML message.
* @param string $formatted_destination The formatted shipping destination.
*/
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
)
);
$calculator_text = esc_html__( 'Enter a different address', 'woocommerce' );
endif;
?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment