Opened 3 months ago
Last modified 3 months ago
#62671 new defect (bug)
REST API Plugins Endpoint: Plugins are activated before language packages are installed
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.7 |
Component: | REST API | Keywords: | has-patch |
Focuses: | rest-api | Cc: |
Description
Problem
When using the REST API endpoint to install a plugin and activate it, the plugin is activated before the plugin's languages are installed. This causes that if the plugin is creating some content during activation (i.e., WooCommerce creates a series of pages), this content is created in English instead of following the language setting from WordPress.
Expected behavior
When installing and activating a plugin via REST API, the content created by the plugin (i.e. WooCommerce) should be created in the same language as WordPress.
Request example
POST /wp/v2/plugins { "slug": "woocommerce", "status": "active" }
Related code
Possible solution
Invert the order of the operations in the highlighted code so languages are installed first and the plugin is activated after.
Change History (1)
This ticket was mentioned in PR #7980 on WordPress/wordpress-develop by @umeshsinghin.
3 months ago
#1
- Keywords has-patch added
https://core.trac.wordpress.org/ticket/62671