Automattic\WooCommerce\Internal\ProductDownloads
DownloadableFileAttachments::handle_comments_open
Close comments and pings on downloadable product files, which would otherwise list them in comment feeds.
Метод класса: DownloadableFileAttachments{}
Хуков нет.
Возвращает
bool|mixed.
Использование
$DownloadableFileAttachments = new DownloadableFileAttachments(); $DownloadableFileAttachments->handle_comments_open( $open, $post_id );
- $open(true|false|разное) (обязательный)
- Whether comments or pings are open.
- $post_id(int|разное) (обязательный)
- Post ID.
Код DownloadableFileAttachments::handle_comments_open() DownloadableFileAttachments::handle comments open WC 11.3.0
public function handle_comments_open( $open, $post_id ) {
return $this->is_downloadable_file( absint( $post_id ) ) ? false : $open;
}