ReviewsCommentsOverrides::display_reviews_moved_notice()protectedWC 1.0

Renders an admin notice informing the user that reviews were moved to a new page.

Метод класса: ReviewsCommentsOverrides{}

Хуков нет.


null. Ничего.


// protected - в коде основоного (родительского) или дочернего класса
$result = $this->display_reviews_moved_notice() : void;

Код ReviewsCommentsOverrides::display_reviews_moved_notice() WC 7.7.0

protected function display_reviews_moved_notice() : void {
	$dismiss_url = wp_nonce_url(
				'wc-hide-notice' => urlencode( static::REVIEWS_MOVED_NOTICE_ID ),

	<div class="notice notice-info is-dismissible">
		<p><strong><?php esc_html_e( 'Product reviews have moved!', 'woocommerce' ); ?></strong></p>
		<p><?php esc_html_e( 'Product reviews can now be managed from Products > Reviews.', 'woocommerce' ); ?></p>
		<p class="submit">
			<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=product&page=product-reviews' ) ); ?>" class="button-primary"><?php esc_html_e( 'Visit new location', 'woocommerce' ); ?></a>
		<button type="button" class="notice-dismiss" onclick="window.location = '<?php echo esc_url( $dismiss_url ); ?>';"><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice.', 'woocommerce' ); ?></span></button>