includes/abstracts/abstract-wc-product.php 1 location
|
@@ 331-335 (lines=5) @@
|
| 328 |
|
$status = ( 'outofstock' === $status ) ? 'outofstock' : 'instock'; |
| 329 |
|
|
| 330 |
|
// Sanity check |
| 331 |
|
if ( $this->managing_stock() ) { |
| 332 |
|
if ( ! $this->backorders_allowed() && $this->get_stock_quantity() <= get_option( 'woocommerce_notify_no_stock_amount' ) ) { |
| 333 |
|
$status = 'outofstock'; |
| 334 |
|
} |
| 335 |
|
} |
| 336 |
|
|
| 337 |
|
if ( update_post_meta( $this->id, '_stock_status', $status ) ) { |
| 338 |
|
$this->stock_status = $status; |
includes/class-wc-product-variation.php 1 location
|
@@ 501-503 (lines=3) @@
|
| 498 |
|
$status = 'outofstock'; |
| 499 |
|
} |
| 500 |
|
} elseif ( 'parent' === $this->managing_stock() ) { |
| 501 |
|
if ( ! $this->parent->backorders_allowed() && $this->parent->get_stock_quantity() <= get_option( 'woocommerce_notify_no_stock_amount' ) ) { |
| 502 |
|
$status = 'outofstock'; |
| 503 |
|
} |
| 504 |
|
} |
| 505 |
|
|
| 506 |
|
if ( update_post_meta( $this->variation_id, '_stock_status', $status ) ) { |