includes/class-wc-product-variation.php 1 location
|
@@ 487-489 (lines=3) @@
|
| 484 |
|
$status = 'outofstock'; |
| 485 |
|
} |
| 486 |
|
} elseif ( 'parent' === $this->managing_stock() ) { |
| 487 |
|
if ( ! $this->parent->backorders_allowed() && $this->parent->get_stock_quantity() <= get_option( 'woocommerce_notify_no_stock_amount' ) ) { |
| 488 |
|
$status = 'outofstock'; |
| 489 |
|
} |
| 490 |
|
} |
| 491 |
|
|
| 492 |
|
if ( update_post_meta( $this->variation_id, '_stock_status', $status ) ) { |
includes/abstracts/abstract-wc-product.php 1 location
|
@@ 341-345 (lines=5) @@
|
| 338 |
|
$status = ( 'outofstock' === $status ) ? 'outofstock' : 'instock'; |
| 339 |
|
|
| 340 |
|
// Sanity check |
| 341 |
|
if ( $this->managing_stock() ) { |
| 342 |
|
if ( ! $this->backorders_allowed() && $this->get_stock_quantity() <= get_option( 'woocommerce_notify_no_stock_amount' ) ) { |
| 343 |
|
$status = 'outofstock'; |
| 344 |
|
} |
| 345 |
|
} |
| 346 |
|
|
| 347 |
|
if ( update_post_meta( $this->id, '_stock_status', $status ) ) { |
| 348 |
|
$this->stock_status = $status; |