Adding @k1sul1's suggestion from the comments as it's more concise than what I had before:
I just wanted them all gone, so I ran this in the MySQL shell.
UPDATE wp_posts SET post_content = REGEXP_REPLACE(post_content, "\\[\/?vc(.*?)\]", "");
Note the double backslash. If you forget it, you'll replace all v's and c's with nothing, and the shortcodes will still be there. This works for other shortcode as well, just replace vc.
Take a backup beforehand.
Hi, @praful2111
I'm having trouble with this code due to
PHP Notice: Undefined variable: content in /var/www/example.com/htdocs/wp-content/themes/generatepress_child/functions.php on line 474
so the Woocommerce product content always gets replaced with blank content.It's something with the line
$content = apply_filters('the_content', $content);
I must add that I want to replace those image shortcodes on Woocommerce products, but I tested it with regular Wordpress post as-well and it doesn't work...
Can somebody please advise?
Thanks a ton.