Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Store Editing Templates: Migrate incorrect plugin slug in the database. #5533

Closed
tjcafferkey opened this issue Jan 7, 2022 · 1 comment
Closed
Assignees
Labels
focus: FSE Work related to prepare WooCommerce for FSE. focus: template Related to API powering block template functionality in the Site Editor type: bug The issue/PR concerns a confirmed bug.

Comments

@tjcafferkey
Copy link
Contributor

tjcafferkey commented Jan 7, 2022

Description

Please read the original issue about the incorrect plugin slug here #5423

We were able to fix this by updating the usages to use the correct plugin slug (#5519) (woocommerce/woocommerce) and querying the DB for both the incorrect and correct slugs used. For sites that have already customised DB templates whilst using the old slug they will have this saved in their DB. We need to migrate these values to the new slug.

What we need to consider

If the site has DB entries using the old slug and the new slug:
We will have to find the term_id for the old slug and update all entries using it to use the new slugs term_id.

If the site has DB entries just using the old slug:
We can simply update the old slug row in wp_terms

From:
name: WooCommerce
slug: woocommerce

To:
name:woocommerce/woocommerce
slug: woocommerce-woocommerce

@tjcafferkey tjcafferkey added type: bug The issue/PR concerns a confirmed bug. focus: FSE Work related to prepare WooCommerce for FSE. focus: template Related to API powering block template functionality in the Site Editor labels Jan 7, 2022
@tjcafferkey tjcafferkey changed the title Store Editing Templates: Migrate incorrect plugin slug Store Editing Templates: Migrate incorrect plugin slug in the database. Jan 7, 2022
@frontdevde frontdevde self-assigned this Jan 13, 2022
@frontdevde
Copy link
Contributor

Closing this issue as we decided against a DB migration (see slack-archives/C8X6Q7XQU/p1642065460228900).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: FSE Work related to prepare WooCommerce for FSE. focus: template Related to API powering block template functionality in the Site Editor type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

No branches or pull requests

2 participants