Skip to content

Commit

Permalink
Merge branch 'release/1.4.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed Jun 1, 2018
2 parents dd32f93 + be25e15 commit 77f95d2
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 14 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
== Changelog ==

= 1.4.8 - 01 June 2018 =
* Updated WooCommerce files to WooCommerce version `3.4.0`.
* Styled comment form cookie consent setting.

= 1.4.7 - 21 May 2018 =
* Resolved a warning in the image post format by adding a conditional.
* Updated mobile menu breakpoint setting so it will reflect live in the Customizer.
Expand Down
17 changes: 17 additions & 0 deletions sass/site/primary/_comments.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,23 @@
}
}

.comment-form-cookies-consent {
align-items: center;
clear: both;
display: flex;

input {
line-height: 1;
margin-right: 5px;
}

label {
display: inline-block;
font-weight: normal;
margin-bottom: 0;
}
}

.form-submit {
margin-top: 10px;
text-align: right;
Expand Down
11 changes: 11 additions & 0 deletions style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 10 additions & 8 deletions woocommerce/cart/cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 3.3.0
* @version 3.4.0
*/

if ( ! defined( 'ABSPATH' ) ) {
Expand Down Expand Up @@ -59,27 +59,29 @@
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );

if ( ! $product_permalink ) {
echo $thumbnail;
echo wp_kses_post( $thumbnail );
} else {
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail );
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), wp_kses_post( $thumbnail ) );
}
?>
</td>

<td class="product-name" data-title="<?php esc_html_e( 'Product', 'siteorigin-north' ); ?>">
<?php
if ( ! $product_permalink ) {
echo apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . '&nbsp;';
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . '&nbsp;' );
} else {
echo apply_filters( 'woocommerce_cart_item_name', sprintf( '<a class="cart-item-product-name" href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key );
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', sprintf( '<a class="cart-item-product-name" href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key ) );
}

do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key );

// Meta data
echo wc_get_formatted_cart_item_data( $cart_item );

// Backorder notification
if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
echo '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'siteorigin-north' ) . '</p>';
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'siteorigin-north' ) . '</p>' ) );
}
?>
</td>
Expand Down Expand Up @@ -141,7 +143,7 @@

<label for="coupon_code"><?php _e( 'Coupon', 'siteorigin-north' ); ?>:</label>
<input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'siteorigin-north' ); ?>" />
<input type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e( 'Apply Coupon', 'siteorigin-north' ); ?>">
<button type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'siteorigin-north' ); ?>"><?php esc_attr_e( 'Apply coupon', 'siteorigin-north' ); ?></button>
<?php do_action( 'woocommerce_cart_coupon' ); ?>
</div>
<?php } ?>
Expand All @@ -153,7 +155,7 @@

<?php do_action( 'woocommerce_cart_actions' ); ?>

<?php wp_nonce_field( 'woocommerce-cart' ); ?>
<?php wp_nonce_field( 'woocommerce-cart', 'woocommerce-cart-nonce' ); ?>
</td>
</tr>

Expand Down
12 changes: 6 additions & 6 deletions woocommerce/single-product/add-to-cart/simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @see http://docs.woothemes.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 3.0.0
* @version 3.4.0
*/

if ( ! defined( 'ABSPATH' ) ) {
Expand All @@ -24,7 +24,7 @@
// Availability.
$availability = $product->get_availability();
$availability_html = empty( $availability['availability'] ) ? '' : '<p class="stock ' . esc_attr( $availability['class'] ) . '">' . esc_html( $availability['availability'] ) . '</p>';
echo apply_filters( 'woocommerce_stock_html', $availability_html, $availability['availability'], $product );
echo apply_filters( 'woocommerce_stock_html', $availability_html, $availability['availability'], $product );
}
?>

Expand All @@ -42,17 +42,17 @@
woocommerce_quantity_input( array(
'min_value' => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ),
'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ),
'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( $_POST['quantity'] ) : $product->get_min_purchase_quantity(),
'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( wp_unslash( $_POST['quantity'] ) ) : $product->get_min_purchase_quantity(),
) );
} else {
if ( ! $product->is_sold_individually() ) {
woocommerce_quantity_input( array(
'min_value' => apply_filters( 'woocommerce_quantity_input_min', 1, $product ),
'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product ),
'input_value' => ( isset( $_POST['quantity'] ) ? wc_stock_amount( $_POST['quantity'] ) : 1 )
'input_value' => ( isset( $_POST['quantity'] ) ? wc_stock_amount( wp_unslash( $_POST['quantity'] ) ) : 1 )
) );
}
}
}
}
?>

<?php do_action( 'woocommerce_after_add_to_cart_quantity' ); ?>
Expand Down

0 comments on commit 77f95d2

Please sign in to comment.