$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() ) ) . '';
From 08c6cfdea83a3e03dc115289f6ce517b988c4cee Mon Sep 17 00:00:00 2001
From: Mike Jolley
Date: Tue, 14 Mar 2017 12:28:48 +0000
Subject: [PATCH 6/9] composer version
---
tests/bin/travis.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/bin/travis.sh b/tests/bin/travis.sh
index 1ed7426b53f..9e50956bbda 100755
--- a/tests/bin/travis.sh
+++ b/tests/bin/travis.sh
@@ -9,6 +9,7 @@ if [ $1 == 'before' ]; then
# No Xdebug and therefore no coverage in PHP 5.3
[[ ${TRAVIS_PHP_VERSION} == '5.3' ]] && exit;
+ composer require phpunit/phpunit:5.6
composer self-update
composer install --no-interaction
From a9e224fa78fed267bc661ac7ea3ec845ef355fe4 Mon Sep 17 00:00:00 2001
From: Mike Jolley
Date: Tue, 14 Mar 2017 12:32:34 +0000
Subject: [PATCH 7/9] Wrap rating with esc_html
---
includes/widgets/class-wc-widget-layered-nav-filters.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 ) ) . '';
}
}
From 49b782d20e1a3c7f98738a57d7629bfbe91f3dc2 Mon Sep 17 00:00:00 2001
From: Mike Jolley
Date: Tue, 14 Mar 2017 12:34:20 +0000
Subject: [PATCH 8/9] Correct formatting
---
includes/shortcodes/class-wc-shortcode-my-account.php | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/includes/shortcodes/class-wc-shortcode-my-account.php b/includes/shortcodes/class-wc-shortcode-my-account.php
index c8749ab1461..599f94458f9 100644
--- a/includes/shortcodes/class-wc-shortcode-my-account.php
+++ b/includes/shortcodes/class-wc-shortcode-my-account.php
@@ -246,11 +246,12 @@ class WC_Shortcode_My_Account {
if ( ! $user_data && is_email( $login ) && apply_filters( 'woocommerce_get_username_from_email', true ) ) {
$user_data = get_user_by( 'email', $login );
}
-
- $errors = new WP_Error();
- do_action( 'lostpassword_post', $errors );
- if ( $errors->get_error_code() ) {
+ $errors = new WP_Error();
+
+ do_action( 'lostpassword_post', $errors );
+
+ if ( $errors->get_error_code() ) {
wc_add_notice( $allow->get_error_message(), 'error' );
return false;
}
From ed09c20715de77454232c7fe6c002faef69298be Mon Sep 17 00:00:00 2001
From: Mike Jolley
Date: Tue, 14 Mar 2017 12:50:54 +0000
Subject: [PATCH 9/9] Trying to fix travis tests
---
tests/bin/phpunit.sh | 3 +++
tests/bin/travis.sh | 1 -
2 files changed, 3 insertions(+), 1 deletion(-)
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
diff --git a/tests/bin/travis.sh b/tests/bin/travis.sh
index 9e50956bbda..1ed7426b53f 100755
--- a/tests/bin/travis.sh
+++ b/tests/bin/travis.sh
@@ -9,7 +9,6 @@ if [ $1 == 'before' ]; then
# No Xdebug and therefore no coverage in PHP 5.3
[[ ${TRAVIS_PHP_VERSION} == '5.3' ]] && exit;
- composer require phpunit/phpunit:5.6
composer self-update
composer install --no-interaction
|