Availability with backorders not requiring notification.
This commit is contained in:
parent
575ba5974e
commit
c51fac23e0
|
@ -593,9 +593,12 @@ class WC_Product {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$class = 'in-stock';
|
$class = 'in-stock';
|
||||||
} elseif ( $this->backorders_allowed() ) {
|
} elseif ( $this->backorders_allowed() && $this->backorders_require_notification() ) {
|
||||||
$availability = __( 'Available on backorder', 'woocommerce' );
|
$availability = __( 'Available on backorder', 'woocommerce' );
|
||||||
$class = 'available-on-backorder';
|
$class = 'available-on-backorder';
|
||||||
|
} elseif ( $this->backorders_allowed() ) {
|
||||||
|
$availability = __( 'In stock', 'woocommerce' );
|
||||||
|
$class = 'in-stock';
|
||||||
} else {
|
} else {
|
||||||
$availability = __( 'Out of stock', 'woocommerce' );
|
$availability = __( 'Out of stock', 'woocommerce' );
|
||||||
$class = 'out-of-stock';
|
$class = 'out-of-stock';
|
||||||
|
|
|
@ -520,9 +520,12 @@ class WC_Product_Variation extends WC_Product {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$class = 'in-stock';
|
$class = 'in-stock';
|
||||||
} elseif ( $this->backorders_allowed() ) {
|
} elseif ( $this->backorders_allowed() && $this->backorders_require_notification() ) {
|
||||||
$availability = __( 'Available on backorder', 'woocommerce' );
|
$availability = __( 'Available on backorder', 'woocommerce' );
|
||||||
$class = 'available-on-backorder';
|
$class = 'available-on-backorder';
|
||||||
|
} elseif ( $this->backorders_allowed() ) {
|
||||||
|
$availability = __( 'In stock', 'woocommerce' );
|
||||||
|
$class = 'in-stock';
|
||||||
} else {
|
} else {
|
||||||
$availability = __( 'Out of stock', 'woocommerce' );
|
$availability = __( 'Out of stock', 'woocommerce' );
|
||||||
$class = 'out-of-stock';
|
$class = 'out-of-stock';
|
||||||
|
|
Loading…
Reference in New Issue