Skip to content

Fix: Update Indian state and UT list per official standards. Closes #60264 #60266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from

Conversation

Akhilanandateja
Copy link

Submission Review Guidelines:

Changes proposed in this Pull Request:

This pull request updates the list of Indian states and union territories to align with current official standards, addressing outdated names and administrative divisions.

Closes #60264.

Screenshots or screen recordings:

Before After
before-1
before-2
before-3
after-1
after-2
after-3

How to test the changes in this Pull Request:

  1. Check out this branch on your local test environment.
  2. Navigate to the frontend of your store and go to the Checkout page.
  3. In the billing or shipping address form, select "India" from the Country dropdown.
  4. Click on the "State" dropdown and verify the following:
    • The state "Orissa" is no longer present; "Odisha" is.
    • The territory "Pondicherry" is renamed to "Puducherry".
    • The territories "Dadra and Nagar Haveli" and "Daman and Diu" are replaced by a single entry: "Dadra and Nagar Haveli and Daman and Diu".
    • The new union territory "Ladakh" is present.

Testing that has already taken place:

I have tested these changes on a local WordPress environment (v6.5) with WooCommerce (trunk) and the Storefront theme. I followed the testing steps above and confirmed that the state dropdown on the checkout page displays the updated and correct list of Indian states and union territories.

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch

Type

  • Fix - Fixes an existing bug

Message

Update the list of Indian states and union territories to align with current official standards.

@github-actions github-actions bot added plugin: woocommerce Issues related to the WooCommerce Core plugin. type: community contribution labels Aug 8, 2025
Copy link
Contributor

coderabbitai bot commented Aug 8, 2025

📝 Walkthrough

Walkthrough

The updates modify the WooCommerce localization data for Indian states and union territories, reflecting recent administrative changes and naming conventions. The changelog documents these adjustments as a patch-level fix, while the primary change updates the state array in the localization file without altering any exported functions or classes.

Changes

Cohort / File(s) Change Summary
Changelog Entry
plugins/woocommerce/changelog/60266-fix-60264-update-indian-states
Added a changelog entry describing the patch-level update to the Indian states and union territories list in WooCommerce, including metadata for tracking the fix.
Indian States Localization Update
plugins/woocommerce/i18n/states.php
Updated the array of Indian states: reordered Jammu and Kashmir and Ladakh to appear after Delhi, renamed "Pondicherry (Puducherry)" to "Puducherry," reordered Uttarakhand after Uttar Pradesh, and added trailing whitespace to Daman and Diu. No changes to function signatures or array structure.

Sequence Diagram(s)

sequenceDiagram
    participant Admin as WooCommerce Maintainer
    participant Changelog as Changelog File
    participant States as states.php

    Admin->>Changelog: Add patch-level changelog entry for Indian states update
    Admin->>States: Update Indian states and union territories array
    States-->>WooCommerce: Provide updated states list for localization
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5-10 minutes

Possibly related PRs

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.


📜 Recent review details

Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d835ab8 and d5746e5.

📒 Files selected for processing (1)
  • plugins/woocommerce/i18n/states.php (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/woocommerce/i18n/states.php
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@nerrad nerrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! We follow the CLDR standard, so any changes must not contradict it. See review comments for more details.

Comment on lines 839 to 837
'DN' => __( 'Dadra and Nagar Haveli', 'woocommerce' ),
'DD' => __( 'Daman and Diu', 'woocommerce' ),
'DH' => __( 'Dadra and Nagar Haveli and Daman and Diu', 'woocommerce' ), // New merged UT with code DH
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLDR standard (release 47) seems to have multiple entries for these states that we should mirror.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the clarification! I've updated the code to keep the territories separate to align with the CLDR standard. The new commit has been pushed.

Comment on lines +839 to +840
'JK' => __( 'Jammu and Kashmir', 'woocommerce' ),
'LA' => __( 'Ladakh', 'woocommerce' ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, why did you change the order of these two entries?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good question. There was no specific reason for the order I chose. I am happy to reorder them alphabetically by code (JK before LA) or by name if that aligns better with the project's standards. Just let me know what you prefer! Thank You.

@Akhilanandateja Akhilanandateja requested a review from nerrad August 9, 2025 08:24
Copy link
Contributor

github-actions bot commented Aug 9, 2025

Testing Guidelines

Hi ,

Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed.

Reminder: PR reviewers are required to document testing performed. This includes:

  • 🖼️ Screenshots or screen recordings.
  • 📝 List of functionality tested / steps followed.
  • 🌐 Site details (environment attributes such as hosting type, plugins, theme, store size, store age, and relevant settings).
  • 🔍 Any analysis performed, such as assessing potential impacts on environment attributes and other plugins, conducting performance profiling, or using LLM/AI-based analysis.

⚠️ Within the testing details you provide, please ensure that no sensitive information (such as API keys, passwords, user data, etc.) is included in this public issue.

@Akhilanandateja Akhilanandateja changed the title Fix: Update Indian state and UT list per official standards. Closes #60264 Updated Indian state and UT list per official standards. Aug 9, 2025
@Akhilanandateja Akhilanandateja changed the title Updated Indian state and UT list per official standards. Updated Indian state and UT list per official standards. Closes #60264 Aug 9, 2025
@Akhilanandateja Akhilanandateja changed the title Updated Indian state and UT list per official standards. Closes #60264 Fix: Update Indian state and UT list per official standards. Closes #60264 Aug 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin. type: community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Indian state names and codes need updating
2 participants