Fix missing tooltip in admin orders table. Fixes #33228 (#35638)

Co-authored-by: Kaushik Somaiya <kaushiksomaiya@Kaushiks-MacBook-Pro.local>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
This commit is contained in:
Kaushik Somaiya 2022-11-23 16:36:27 +05:30 committed by GitHub
parent fd7fc355fa
commit 102fabbee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix tooltips not appearing in the orders list admin page.

View File

@ -715,7 +715,9 @@ class ListTable extends WP_List_Table {
*/ */
public function render_order_status_column( WC_Order $order ): void { public function render_order_status_column( WC_Order $order ): void {
$tooltip = ''; $tooltip = '';
remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
$comment_count = get_comment_count( $order->get_id() ); $comment_count = get_comment_count( $order->get_id() );
add_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
$approved_comments_count = absint( $comment_count['approved'] ); $approved_comments_count = absint( $comment_count['approved'] );
if ( $approved_comments_count ) { if ( $approved_comments_count ) {