Skip to content

Add Country toggle-status + bulk-toggle + bulk-update-zone endpoints - #368

Closed
PrestaEdit wants to merge 1 commit into
PrestaShop:devfrom
PrestaEdit:add-country-toggle-endpoints
Closed

PrestaEdit wants to merge 1 commit into
PrestaShop:devfrom
PrestaEdit:add-country-toggle-endpoints

Conversation

@PrestaEdit

Copy link
Copy Markdown
Contributor
Questions Answers
Branch? dev
Description? Adds three status/zone mutation endpoints on Country (standalone files to avoid touching the existing Country.php):
- PUT /countries/{countryId}/toggle-status (ToggleCountryStatusCommand)
- PUT /countries/bulk-toggle-status (BulkToggleCountriesStatusCommand — body {enabled, countryIds}, enabled → expectedStatus)
- PUT /countries/bulk-update-zone (BulkUpdateCountryZoneCommand — body {countryIds, newZoneId})
Type? new feature
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket? Related to PrestaShop/PrestaShop#39630
How to test? Run composer phpunit-integration; CountryStatusZoneEndpointTest toggles the first country (verifies active flipped) and bulk-updates zone on the two first countries.

⚠️ Depends on PR #220 — the three commands were introduced in PS 9.1+/develop and do not exist at the 9.0.3 tag. The 9.0.3 integration / PHPStan CI legs will fail here until #220 (drop 9.0.3 from the module CI matrix) lands.

Adds three status/zone mutation endpoints, standalone files to avoid
touching the existing Country.php:
- PUT /countries/{countryId}/toggle-status   (ToggleCountryStatusCommand)
- PUT /countries/bulk-toggle-status          (BulkToggleCountriesStatusCommand)
- PUT /countries/bulk-update-zone            (BulkUpdateCountryZoneCommand)

The three commands were introduced in PS 9.1+/develop and do not exist
at the 9.0.3 tag — the 9.0.3 CI matrix legs will fail until PR PrestaShop#220
(drop 9.0.3 from CI) lands.

Related to PrestaShop/PrestaShop#39630

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@PrestaEdit

Copy link
Copy Markdown
Contributor Author

Superseded by #429, which merges this endpoint with the rest of the domain, following the mutualisation asked for by the core team (one PR per domain rather than one per endpoint).

The consolidated PR is green and lists what changed for this endpoint on the way in. Closing here to keep the review in one place.

@PrestaEdit PrestaEdit closed this Aug 21, 2026
@github-project-automation github-project-automation Bot moved this from Ready for review to Closed in PR Dashboard Aug 21, 2026
@ps-jarvis ps-jarvis moved this from Closed to Ready for review in PR Dashboard Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants