diff --git a/includes/admin/meta-boxes/views/html-order-fee.php b/includes/admin/meta-boxes/views/html-order-fee.php index 3bcfe1be1ea..f7e823b7274 100644 --- a/includes/admin/meta-boxes/views/html-order-fee.php +++ b/includes/admin/meta-boxes/views/html-order-fee.php @@ -56,7 +56,7 @@ if ( ! defined( 'ABSPATH' ) ) {
$order->get_currency() ) ) : '–'; + echo ( '' !== $tax_item_total ) ? wc_price( wc_round_tax_total( $tax_item_total ), array( 'currency' => $order->get_currency() ) ) : '–'; if ( $refunded = $order->get_tax_refunded_for_item( $item_id, $tax_item_id, 'fee' ) ) { echo '-' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . ''; diff --git a/includes/admin/meta-boxes/views/html-order-shipping.php b/includes/admin/meta-boxes/views/html-order-shipping.php index 905fe7372c1..e81d1848364 100644 --- a/includes/admin/meta-boxes/views/html-order-shipping.php +++ b/includes/admin/meta-boxes/views/html-order-shipping.php @@ -82,7 +82,7 @@ if ( ! defined( 'ABSPATH' ) ) {
$order->get_currency() ) ) : '–'; + echo ( '' !== $tax_item_total ) ? wc_price( wc_round_tax_total( $tax_item_total ), array( 'currency' => $order->get_currency() ) ) : '–'; if ( $refunded = $order->get_tax_refunded_for_item( $item_id, $tax_item_id, 'shipping' ) ) { echo '-' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . ''; diff --git a/includes/class-wc-download-handler.php b/includes/class-wc-download-handler.php index 39a7a5b9734..93195b74c7f 100644 --- a/includes/class-wc-download-handler.php +++ b/includes/class-wc-download-handler.php @@ -75,7 +75,9 @@ class WC_Download_Handler { $count = $download->get_download_count(); $remaining = $download->get_downloads_remaining(); $download->set_download_count( $count + 1 ); - $download->set_downloads_remaining( $remaining - 1 ); + if ( '' !== $remaining ) { + $download->set_downloads_remaining( $remaining - 1 ); + } $download->save(); self::download( $product->get_file_download_path( $download->get_download_id() ), $download->get_product_id() ); diff --git a/includes/shortcodes/class-wc-shortcode-my-account.php b/includes/shortcodes/class-wc-shortcode-my-account.php index 33b93e25836..599f94458f9 100644 --- a/includes/shortcodes/class-wc-shortcode-my-account.php +++ b/includes/shortcodes/class-wc-shortcode-my-account.php @@ -247,7 +247,14 @@ class WC_Shortcode_My_Account { $user_data = get_user_by( 'email', $login ); } - do_action( 'lostpassword_post' ); + $errors = new WP_Error(); + + do_action( 'lostpassword_post', $errors ); + + if ( $errors->get_error_code() ) { + wc_add_notice( $allow->get_error_message(), 'error' ); + return false; + } if ( ! $user_data ) { wc_add_notice( __( 'Invalid username or email.', 'woocommerce' ), 'error' ); diff --git a/includes/widgets/class-wc-widget-layered-nav-filters.php b/includes/widgets/class-wc-widget-layered-nav-filters.php index afb0801ae04..1d85c6e7404 100644 --- a/includes/widgets/class-wc-widget-layered-nav-filters.php +++ b/includes/widgets/class-wc-widget-layered-nav-filters.php @@ -163,7 +163,7 @@ class WC_Widget_Layered_Nav_Filters extends WC_Widget { foreach ( $rating_filter as $rating ) { $link_ratings = implode( ',', array_diff( $rating_filter, array( $rating ) ) ); $link = $link_ratings ? add_query_arg( 'rating_filter', $link_ratings ) : remove_query_arg( 'rating_filter', $base_link ); - echo '
  • ' . sprintf( esc_html__( 'Rated %s out of 5', 'woocommerce' ), $rating ) . '
  • '; + echo '
  • ' . sprintf( esc_html__( 'Rated %s out of 5', 'woocommerce' ), esc_html( $rating ) ) . '
  • '; } } diff --git a/templates/checkout/form-billing.php b/templates/checkout/form-billing.php index a7b03fb4698..8f3197d5f49 100644 --- a/templates/checkout/form-billing.php +++ b/templates/checkout/form-billing.php @@ -65,7 +65,6 @@ if ( ! defined( 'ABSPATH' ) ) { get_checkout_fields( 'account' ) as $key => $field ) : ?> get_value( $key ) ); ?> -
    diff --git a/templates/myaccount/form-edit-account.php b/templates/myaccount/form-edit-account.php index e76c6a0f6c7..4fa19c4c6a2 100644 --- a/templates/myaccount/form-edit-account.php +++ b/templates/myaccount/form-edit-account.php @@ -34,7 +34,6 @@ do_action( 'woocommerce_before_edit_account_form' ); ?>

    -

    @@ -57,7 +56,6 @@ do_action( 'woocommerce_before_edit_account_form' ); ?>

    -
    diff --git a/templates/single-product/product-image.php b/templates/single-product/product-image.php index 2e74ce71fa8..8537ca881ba 100644 --- a/templates/single-product/product-image.php +++ b/templates/single-product/product-image.php @@ -45,13 +45,13 @@ $wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_cl ); if ( has_post_thumbnail() ) { - $html = ''; + $html .= '
    '; } else { - $html = ''; + $html .= ''; } echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, get_post_thumbnail_id( $post->ID ) ); diff --git a/templates/single-product/product-thumbnails.php b/templates/single-product/product-thumbnails.php index f24fd07ba18..648a9d264eb 100644 --- a/templates/single-product/product-thumbnails.php +++ b/templates/single-product/product-thumbnails.php @@ -38,9 +38,9 @@ if ( $attachment_ids && has_post_thumbnail() ) { 'data-large_image_height' => $full_size_image[2], ); - $html = ''; + $html .= ''; echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $attachment_id ); } diff --git a/tests/bin/phpunit.sh b/tests/bin/phpunit.sh index bb7a731ab40..37c452db0b9 100755 --- a/tests/bin/phpunit.sh +++ b/tests/bin/phpunit.sh @@ -1,3 +1,6 @@ +composer require phpunit/phpunit:5.6 +composer install + if [[ ${TRAVIS_BRANCH} == 'master' ]] && [[ ${TRAVIS_EVENT_TYPE} != 'pull_request' ]] && [[ ${TRAVIS_PHP_VERSION} == ${PHP_LATEST_STABLE} ]]; then phpunit -c phpunit.xml.dist --coverage-clover ./tmp/clover.xml else