[wp-trac] [WordPress Trac] #64977: The `core/get-site-info` ability returns wrong locale code in the admin

WordPress Trac noreply at wordpress.org
Sun May 3 19:30:00 UTC 2026


#64977: The `core/get-site-info` ability returns wrong locale code in the admin
---------------------------------+---------------------
 Reporter:  afercia              |       Owner:  (none)
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  7.1
Component:  Abilities API        |     Version:  6.9
 Severity:  normal               |  Resolution:
 Keywords:  abilities has-patch  |     Focuses:
---------------------------------+---------------------

Comment (by yusufmudagal):

 Tested PR https://github.com/WordPress/wordpress-develop/pull/11388

 In a local test environment, I set the site locale to `it_IT` and the
 admin user locale to `es_ES`.

 Before the patch, `wp_get_ability( 'core/get-site-info' )->execute()`
 returned `language => es` in admin context.
 After the patch, the same ability returned `language => it-IT`, matching
 the site locale instead of the user locale.

 Patch tests well for me.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64977#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list