Automattic\WooCommerce\Internal\Admin\ProductReviews
ReviewsListTable::column_response()
Renders the product column.
Method of the class: ReviewsListTable{}
No Hooks.
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->column_response( $item ) : void;
- $item(WP_Comment|mixed) (required)
- Review or reply being rendered.
Notes
- See: WP_Comments_List_Table::column_response() for consistency.
ReviewsListTable::column_response() ReviewsListTable::column response code WC 9.7.1
<?php protected function column_response( $item ) : void { $product_post = get_post(); ob_start(); if ( $product_post ) : ?> <div class="response-links"> <?php if ( current_user_can( 'edit_product', $product_post->ID ) ) : $post_link = "<a href='" . esc_url( get_edit_post_link( $product_post->ID ) ) . "' class='comments-edit-item-link'>"; $post_link .= esc_html( get_the_title( $product_post->ID ) ) . '</a>'; else : $post_link = esc_html( get_the_title( $product_post->ID ) ); endif; echo $post_link; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $post_type_object = get_post_type_object( $product_post->post_type ); ?> <a href="<?php echo esc_url( get_permalink( $product_post->ID ) ); ?>" class="comments-view-item-link"> <?php echo esc_html( $post_type_object->labels->view_item ); ?> </a> <span class="post-com-count-wrapper post-com-count-<?php echo esc_attr( $product_post->ID ); ?>"> <?php $this->comments_bubble( $product_post->ID, get_pending_comments_num( $product_post->ID ) ); ?> </span> </div> <?php endif; echo $this->filter_column_output( 'response', ob_get_clean(), $item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped }