merge branch 'master' into multiple-and-dynamic-galleries
This commit is contained in:
commit
20d2c8b269
|
@ -56,7 +56,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<td class="line_tax" width="1%">
|
||||
<div class="view">
|
||||
<?php
|
||||
echo ( '' != $tax_item_total ) ? wc_price( wc_round_tax_total( $tax_item_total ), array( 'currency' => $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 '<small class="refunded">-' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . '</small>';
|
||||
|
|
|
@ -82,7 +82,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<td class="line_tax" width="1%">
|
||||
<div class="view">
|
||||
<?php
|
||||
echo ( '' != $tax_item_total ) ? wc_price( wc_round_tax_total( $tax_item_total ), array( 'currency' => $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 '<small class="refunded">-' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . '</small>';
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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' );
|
||||
|
|
|
@ -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 '<li class="chosen"><a aria-label="' . esc_attr__( 'Remove filter', 'woocommerce' ) . '" href="' . esc_url( $link ) . '">' . sprintf( esc_html__( 'Rated %s out of 5', 'woocommerce' ), $rating ) . '</a></li>';
|
||||
echo '<li class="chosen"><a aria-label="' . esc_attr__( 'Remove filter', 'woocommerce' ) . '" href="' . esc_url( $link ) . '">' . sprintf( esc_html__( 'Rated %s out of 5', 'woocommerce' ), esc_html( $rating ) ) . '</a></li>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php foreach ( $checkout->get_checkout_fields( 'account' ) as $key => $field ) : ?>
|
||||
<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
|
||||
<?php endforeach; ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -34,7 +34,6 @@ do_action( 'woocommerce_before_edit_account_form' ); ?>
|
|||
<label for="account_last_name"><?php _e( 'Last name', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="account_last_name" id="account_last_name" value="<?php echo esc_attr( $user->last_name ); ?>" />
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="account_email"><?php _e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
|
@ -57,7 +56,6 @@ do_action( 'woocommerce_before_edit_account_form' ); ?>
|
|||
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text" name="password_2" id="password_2" />
|
||||
</p>
|
||||
</fieldset>
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php do_action( 'woocommerce_edit_account_form' ); ?>
|
||||
|
||||
|
|
|
@ -45,13 +45,13 @@ $wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_cl
|
|||
);
|
||||
|
||||
if ( has_post_thumbnail() ) {
|
||||
$html = '<figure data-thumb="' . get_the_post_thumbnail_url( $post->ID, 'shop_thumbnail' ) . '" class="woocommerce-product-gallery__image"><a href="' . esc_url( $full_size_image[0] ) . '">';
|
||||
$html = '<div data-thumb="' . get_the_post_thumbnail_url( $post->ID, 'shop_thumbnail' ) . '" class="woocommerce-product-gallery__image"><a href="' . esc_url( $full_size_image[0] ) . '">';
|
||||
$html .= get_the_post_thumbnail( $post->ID, 'shop_single', $attributes );
|
||||
$html .= '</a></figure>';
|
||||
$html .= '</a></div>';
|
||||
} else {
|
||||
$html = '<figure class="woocommerce-product-gallery__image--placeholder">';
|
||||
$html = '<div class="woocommerce-product-gallery__image--placeholder">';
|
||||
$html .= sprintf( '<img src="%s" alt="%s" class="wp-post-image" />', esc_url( wc_placeholder_img_src() ), esc_html__( 'Awaiting product image', 'woocommerce' ) );
|
||||
$html .= '</figure>';
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, get_post_thumbnail_id( $post->ID ) );
|
||||
|
|
|
@ -38,9 +38,9 @@ if ( $attachment_ids && has_post_thumbnail() ) {
|
|||
'data-large_image_height' => $full_size_image[2],
|
||||
);
|
||||
|
||||
$html = '<figure data-thumb="' . esc_url( $thumbnail[0] ) . '" class="woocommerce-product-gallery__image"><a href="' . esc_url( $full_size_image[0] ) . '">';
|
||||
$html = '<div data-thumb="' . esc_url( $thumbnail[0] ) . '" class="woocommerce-product-gallery__image"><a href="' . esc_url( $full_size_image[0] ) . '">';
|
||||
$html .= wp_get_attachment_image( $attachment_id, 'shop_single', false, $attributes );
|
||||
$html .= '</a></figure>';
|
||||
$html .= '</a></div>';
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $attachment_id );
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue