|
@@ 755-759 (lines=5) @@
|
| 752 |
|
$visible = false; |
| 753 |
|
|
| 754 |
|
// Published/private |
| 755 |
|
} elseif ( 'publish' !== $this->post->post_status && ! current_user_can( 'edit_post', $this->id ) ) { |
| 756 |
|
$visible = false; |
| 757 |
|
|
| 758 |
|
// Out of stock visibility |
| 759 |
|
} elseif ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) && ! $this->is_in_stock() ) { |
| 760 |
|
$visible = false; |
| 761 |
|
|
| 762 |
|
// visibility setting |
|
@@ 805-807 (lines=3) @@
|
| 802 |
|
$purchasable = false; |
| 803 |
|
|
| 804 |
|
// Check the product is published |
| 805 |
|
} elseif ( 'publish' !== $this->post->post_status && ! current_user_can( 'edit_post', $this->id ) ) { |
| 806 |
|
$purchasable = false; |
| 807 |
|
} |
| 808 |
|
|
| 809 |
|
return apply_filters( 'woocommerce_is_purchasable', $purchasable, $this ); |
| 810 |
|
} |