Merge pull request #24914 from woocommerce/fix/24674

Fixed misleading message for Shipping options in cart
This commit is contained in:
Rodrigo Primo 2019-12-06 12:18:56 -03:00 committed by GitHub
commit 6ecf05a197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -58,7 +58,11 @@ $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 :