-
-
Save FrancoStino/0fa839441dc4a7946cf648ceaa423176 to your computer and use it in GitHub Desktop.
Query SQL per identificare gli shortcode contenenti l'id del prodotto nella breve descrizione di ogni prodotto e rimuoverli - Woocommerce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp154_posts | |
SET post_excerpt = REPLACE(post_excerpt, | |
SUBSTRING(post_excerpt, | |
LOCATE('[iw_product_price id=', post_excerpt), | |
LOCATE(']', post_excerpt, LOCATE('[iw_product_price id=', post_excerpt)) - LOCATE('[iw_product_price id=', post_excerpt) + 1 | |
), | |
'' | |
) | |
WHERE post_type = 'product' AND post_excerpt LIKE '%[iw_product_price id=%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment