Skip to content

Commit

Permalink
Respect locale setting to format order counts in admin orders list pa…
Browse files Browse the repository at this point in the history
…ge (#47373)

* Respect locale setting to format order counts in admin orders list page

Fixes #47372

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
  • Loading branch information
gedex and github-actions committed May 13, 2024
1 parent 30756f7 commit 5bbbc52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: tweak

Respect locale settings when formatting order counts in admin orders page.
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ private function get_view_link( string $slug, string $name, int $count, bool $cu
$base_url = get_admin_url( null, 'admin.php?page=wc-orders' . ( 'shop_order' === $this->order_type ? '' : '--' . $this->order_type ) );
$url = esc_url( add_query_arg( 'status', $slug, $base_url ) );
$name = esc_html( $name );
$count = absint( $count );
$count = number_format_i18n( $count );
$class = $current ? 'class="current"' : '';

return "<a href='$url' $class>$name <span class='count'>($count)</span></a>";
Expand Down

0 comments on commit 5bbbc52

Please sign in to comment.