|
@@ 748-752 (lines=5) @@
|
| 745 |
|
$visible = false; |
| 746 |
|
|
| 747 |
|
// Published/private |
| 748 |
|
} elseif ( $this->post->post_status !== 'publish' && ! current_user_can( 'edit_post', $this->id ) ) { |
| 749 |
|
$visible = false; |
| 750 |
|
|
| 751 |
|
// Out of stock visibility |
| 752 |
|
} elseif ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) && ! $this->is_in_stock() ) { |
| 753 |
|
$visible = false; |
| 754 |
|
|
| 755 |
|
// visibility setting |
|
@@ 798-800 (lines=3) @@
|
| 795 |
|
$purchasable = false; |
| 796 |
|
|
| 797 |
|
// Check the product is published |
| 798 |
|
} elseif ( $this->post->post_status !== 'publish' && ! current_user_can( 'edit_post', $this->id ) ) { |
| 799 |
|
$purchasable = false; |
| 800 |
|
} |
| 801 |
|
|
| 802 |
|
return apply_filters( 'woocommerce_is_purchasable', $purchasable, $this ); |
| 803 |
|
} |