Automattic\WooCommerce\Internal\Admin\ProductReviews
ReviewsListTable::set_review_status()
Sets the $comment_status global based on the current request.
Method of the class: ReviewsListTable{}
No Hooks.
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->set_review_status() : void;
Notes
- Global. String. $comment_status
ReviewsListTable::set_review_status() ReviewsListTable::set review status code WC 9.6.1
protected function set_review_status() : void { global $comment_status; $comment_status = sanitize_text_field( wp_unslash( $_REQUEST['comment_status'] ?? 'all' ) ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited if ( ! in_array( $comment_status, [ 'all', 'moderated', 'approved', 'spam', 'trash' ], true ) ) { $comment_status = 'all'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited } }