Skip to content

Commit 34d0b37

Browse files
committed
Merge branch 'release/1.3.8'
2 parents 457d291 + 65670a9 commit 34d0b37

File tree

7 files changed

+33
-13
lines changed

7 files changed

+33
-13
lines changed

changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
View full release information on [Github](https://github.com/siteorigin/siteorigin-north/releases).
44

5+
= 1.3.8 - 02 May 2017 =
6+
* Fixed WooCommerce notification missing padding.
7+
* Updated WooCommerce templates to latest version.
8+
* Included backwards compatibility for WooCommerce templates.
9+
510
= 1.3.7 - 25 April 2017 =
611
* Remove undesired spacing as a result of hentry removal on pages.
712
* Added ability to close header search bar using the escape key.

inc/settings

sass/woocommerce/_elements.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
.woocommerce-message {
4343
border-top-color: $color__primary_accent;
4444
background: #fbfbfb;
45-
padding: 0;
4645

4746
.button {
4847
float: right;

woocommerce.css

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

woocommerce/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function siteorigin_north_woocommerce_update_cart_count( $fragments ) {
172172
function siteorigin_north_woocommerce_quick_view_button() {
173173
global $product;
174174
if( siteorigin_setting( 'woocommerce_display_quick_view' ) ) :
175-
echo '<a href="#" id="product-id-' . $product->id . '" class="button product-quick-view-button" data-product-id="' . $product->id . '">' . __( 'Quick View', 'siteorigin-north') . '</a>';
175+
echo '<a href="#" id="product-id-' . $product->get_id() . '" class="button product-quick-view-button" data-product-id="' . $product->get_id() . '">' . __( 'Quick View', 'siteorigin-north') . '</a>';
176176
endif;
177177
}
178178
endif;

woocommerce/single-product-reviews.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<?php endif; ?>
5858
</div>
5959

60-
<?php if ( get_option( 'woocommerce_review_rating_verification_required' ) === 'no' || wc_customer_bought_product( '', get_current_user_id(), $product->id ) ) : ?>
60+
<?php if ( get_option( 'woocommerce_review_rating_verification_required' ) === 'no' || wc_customer_bought_product( '', get_current_user_id(), $product->get_id() ) ) : ?>
6161

6262
<div id="review_form_wrapper">
6363
<div id="review_form">

woocommerce/single-product/add-to-cart/simple.php

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@
1212
exit; // Exit if accessed directly
1313
}
1414

15-
global $product;
15+
global $product, $woocommerce;
1616

1717
if ( ! $product->is_purchasable() ) {
1818
return;
1919
}
2020

21-
echo wc_get_stock_html( $product );
21+
if ( version_compare( $woocommerce->version, 3.0, '>' ) ) {
22+
echo wc_get_stock_html( $product );
23+
} else {
24+
// Availability.
25+
$availability = $product->get_availability();
26+
$availability_html = empty( $availability['availability'] ) ? '' : '<p class="stock ' . esc_attr( $availability['class'] ) . '">' . esc_html( $availability['availability'] ) . '</p>';
27+
echo apply_filters( 'woocommerce_stock_html', $availability_html, $availability['availability'], $product );
28+
}
2229
?>
2330

2431
<?php if ( $product->is_in_stock() ) : ?>
@@ -31,11 +38,21 @@
3138
<?php do_action( 'woocommerce_before_add_to_cart_quantity' ); ?>
3239

3340
<?php
34-
woocommerce_quantity_input( array(
35-
'min_value' => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ),
36-
'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ),
37-
'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( $_POST['quantity'] ) : $product->get_min_purchase_quantity(),
38-
) );
41+
if ( version_compare( $woocommerce->version, 3.0, '>' ) ) {
42+
woocommerce_quantity_input( array(
43+
'min_value' => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ),
44+
'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ),
45+
'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( $_POST['quantity'] ) : $product->get_min_purchase_quantity(),
46+
) );
47+
} else {
48+
if ( ! $product->is_sold_individually() ) {
49+
woocommerce_quantity_input( array(
50+
'min_value' => apply_filters( 'woocommerce_quantity_input_min', 1, $product ),
51+
'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product ),
52+
'input_value' => ( isset( $_POST['quantity'] ) ? wc_stock_amount( $_POST['quantity'] ) : 1 )
53+
) );
54+
}
55+
}
3956
?>
4057

4158
<?php do_action( 'woocommerce_after_add_to_cart_quantity' ); ?>

0 commit comments

Comments
 (0)