Product_Review_Handler::disable_reviews_if_comments_disabled( bool $enabled, int $post_id )
Summary
If comments are disabled for a product, disable the review form
Parameters
- $enabled
-
(bool) (Required)
- $post_id
-
(int) (Required)
Return
(bool)
Source
File: src/BigCommerce/Forms/Product_Review_Handler.php
public function disable_reviews_if_comments_disabled( $enabled, $post_id ) { if ( ! $enabled ) { return $enabled; // don't enable it } return comments_open( $post_id ); }