WC_Comments::comments_open( bool $open, int $post_id )
See if comments are open.
Description Description
Parameters Parameters
- $open
-
(Required) Whether the current post is open for comments.
- $post_id
-
(Required) Post ID.
Return Return
(bool)
Source Source
File: includes/class-wc-comments.php
public static function comments_open( $open, $post_id ) { if ( 'product' === get_post_type( $post_id ) && ! post_type_supports( 'product', 'comments' ) ) { $open = false; } return $open; }
Changelog Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |