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