@@ 735-739 (lines=5) @@ | ||
732 | $visible = false; |
|
733 | ||
734 | // Published/private |
|
735 | } elseif ( $this->post->post_status !== 'publish' && ! current_user_can( 'edit_post', $this->id ) ) { |
|
736 | $visible = false; |
|
737 | ||
738 | // Out of stock visibility |
|
739 | } elseif ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) && ! $this->is_in_stock() ) { |
|
740 | $visible = false; |
|
741 | ||
742 | // visibility setting |
|
@@ 785-787 (lines=3) @@ | ||
782 | $purchasable = false; |
|
783 | ||
784 | // Check the product is published |
|
785 | } elseif ( $this->post->post_status !== 'publish' && ! current_user_can( 'edit_post', $this->id ) ) { |
|
786 | $purchasable = false; |
|
787 | } |
|
788 | ||
789 | return apply_filters( 'woocommerce_is_purchasable', $purchasable, $this ); |
|
790 | } |