Automattic\WooCommerce\Internal\Admin\ProductReviews

Reviews::add_reviews_page()publicWC 1.0

Registers the Product Reviews submenu page.

Method of the class: Reviews{}

No Hooks.

Return

null. Nothing (null).

Usage

$Reviews = new Reviews();
$Reviews->add_reviews_page(): void;

Reviews::add_reviews_page() code WC 9.6.1

public function add_reviews_page(): void {

	$this->reviews_page_hook = add_submenu_page(
		'edit.php?post_type=product',
		__( 'Reviews', 'woocommerce' ),
		__( 'Reviews', 'woocommerce' ) . $this->get_pending_count_bubble(),
		static::get_capability(),
		static::MENU_SLUG,
		array( $this, 'render_reviews_list_table' )
	);

	add_action( "load-{$this->reviews_page_hook}", array( $this, 'load_reviews_screen' ) );
}