Skip to content
Snippets Groups Projects

feat: update template to latest woocommerce version

Merged Bartek Jaskulski requested to merge update-template into master
1 file
+ 25
7
Compare changes
  • Side-by-side
  • Inline
@@ -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;
?>
Loading