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

Merge branch 'update-template' into 'master'

feat: update template to latest woocommerce version

See merge request !8
parents f57e62cc 22a92877
No related branches found
No related tags found
1 merge request!8feat: update template to latest woocommerce version
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* the readme will list any important changes. * the readme will list any important changes.
* *
* @see https://docs.woocommerce.com/document/template-structure/ * @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates * @package WooCommerce\Templates
* @version 3.6.0 * @version 7.3.0
*/ */
defined( 'ABSPATH' ) || exit; defined( 'ABSPATH' ) || exit;
...@@ -49,7 +49,7 @@ $calculator_text = ''; ...@@ -49,7 +49,7 @@ $calculator_text = '';
if ( $formatted_destination ) { if ( $formatted_destination ) {
// Translators: $s shipping destination. // Translators: $s shipping destination.
printf( esc_html__( 'Shipping to %s.', 'woocommerce' ) . ' ', '<strong>' . esc_html( $formatted_destination ) . '</strong>' ); 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 { } else {
echo wp_kses_post( apply_filters( 'woocommerce_shipping_estimate_html', __( 'Shipping options will be updated during checkout.', 'woocommerce' ) ) ); echo wp_kses_post( apply_filters( 'woocommerce_shipping_estimate_html', __( 'Shipping options will be updated during checkout.', 'woocommerce' ) ) );
} }
...@@ -58,13 +58,31 @@ $calculator_text = ''; ...@@ -58,13 +58,31 @@ $calculator_text = '';
<?php endif; ?> <?php endif; ?>
<?php <?php
elseif ( ! $has_calculated_shipping || ! $formatted_destination ) : 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() ) : 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' ) ) ); 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 : else :
// Translators: $s shipping destination. echo wp_kses_post(
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' ); * 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; 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