Skip to content

Commit a87f8d4

Browse files
WooCommerce 3.7 support
1 parent 0733c25 commit a87f8d4

File tree

8 files changed

+44
-8
lines changed

8 files changed

+44
-8
lines changed

app/integrations/woocommerce/wc-template-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function woocommerce_subcategory_thumbnail( $category ) {
3030
// End modification.
3131
$small_thumbnail_size = apply_filters( 'subcategory_archive_thumbnail_size', 'woocommerce_thumbnail' );
3232
$dimensions = wc_get_image_size( $small_thumbnail_size );
33-
$thumbnail_id = get_woocommerce_term_meta( $category->term_id, 'thumbnail_id', true );
33+
$thumbnail_id = get_term_meta( $category->term_id, 'thumbnail_id', true );
3434

3535
if ( $thumbnail_id ) {
3636
$image = wp_get_attachment_image_src( $thumbnail_id, $small_thumbnail_size );

resources/assets/scss/modules/form-input.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,24 @@ select {
2525
margin: 0;
2626
}
2727

28+
textarea,
29+
select,
30+
.select2-container--focus,
31+
[type="email"],
32+
[type="search"],
33+
[type="tel"],
34+
[type="url"],
35+
[type="password"],
36+
[type="text"] {
37+
38+
.is-tabbing & {
39+
40+
&:focus {
41+
outline: none !important;
42+
}
43+
}
44+
}
45+
2846
[type="submit"],
2947
button {
3048

resources/assets/scss/modules/woocommerce.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@
138138
padding: 1px 5px;
139139
max-width: 30px;
140140
}
141+
142+
.woocommerce-form-login__rememberme {
143+
order: 2;
144+
}
141145
}
142146

143147
.woocommerce-column__title {

resources/views/integrations/woocommerce/cart/cart.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @see https://docs.woocommerce.com/document/template-structure/
1414
* @author WooThemes
1515
* @package WooCommerce/Templates
16-
* @version 3.5.0
16+
* @version 3.7.0
1717
*/
1818

1919
if ( ! defined( 'ABSPATH' ) ) {
@@ -49,6 +49,7 @@
4949
<?php do_action( 'woocommerce_cart_actions' ); ?>
5050
<?php do_action( 'woocommerce_after_cart_contents' ); ?>
5151
<?php do_action( 'woocommerce_after_cart_table' ); ?>
52+
<?php do_action( 'woocommerce_before_cart_collaterals' ); ?>
5253

5354
<div class="cart-collaterals">
5455
<?php

resources/views/integrations/woocommerce/checkout/thankyou.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @see https://docs.woocommerce.com/document/template-structure/
1414
* @author WooThemes
1515
* @package WooCommerce/Templates
16-
* @version 3.2.0
16+
* @version 3.7.0
1717
*/
1818

1919
if ( ! defined( 'ABSPATH' ) ) {
@@ -23,7 +23,10 @@
2323

2424
<div class="woocommerce-order">
2525

26-
<?php if ( $order ) : ?>
26+
<?php
27+
if ( $order ) :
28+
do_action( 'woocommerce_before_thankyou', $order->get_id() );
29+
?>
2730

2831
<?php if ( $order->has_status( 'failed' ) ) : ?>
2932

resources/views/integrations/woocommerce/global/navbar-search.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
'show_count' => true,
6161
'orderby' => 'name',
6262
'order' => 'ASC',
63-
'hide_if_empty' => true,
63+
'hide_empty' => false,
6464
];
6565

6666
wp_dropdown_categories(

resources/views/integrations/woocommerce/order/order-details-item.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @see https://docs.woocommerce.com/document/template-structure/
1414
* @author WooThemes
1515
* @package WooCommerce/Templates
16-
* @version 3.0.0
16+
* @version 3.7.0
1717
*/
1818

1919
if ( ! defined( 'ABSPATH' ) ) {
@@ -53,7 +53,17 @@
5353
<?php echo $order->get_formatted_line_subtotal( $item ); // WPCS: XSS okay. ?>
5454

5555
<del class="subtotal">
56-
<?php echo apply_filters( 'woocommerce_order_item_quantity_html', sprintf( '&times; %s', $item->get_quantity() ), $item ); // WPCS: XSS okay. ?>
56+
<?php
57+
$qty = $item->get_quantity();
58+
$refunded_qty = $order->get_qty_refunded_for_item( $item_id );
59+
60+
if ( $refunded_qty ) {
61+
$qty_display = esc_html( $qty ) . '&nbsp;<strike>&nbsp;' . esc_html( $qty - ( $refunded_qty * -1 ) ) . '&nbsp;</strike>';
62+
} else {
63+
$qty_display = esc_html( $qty );
64+
}
65+
66+
echo apply_filters( 'woocommerce_order_item_quantity_html', sprintf( '&times; %s', $qty_display ), $item ); // WPCS: XSS okay. ?>
5767
</del>
5868
</div>
5969

resources/views/integrations/woocommerce/order/order-details.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @see https://docs.woocommerce.com/document/template-structure/
1414
* @author WooThemes
1515
* @package WooCommerce/Templates
16-
* @version 3.5.2
16+
* @version 3.7.0
1717
*/
1818

1919
if ( ! defined( 'ABSPATH' ) ) {

0 commit comments

Comments
 (0)