Title: Visual COmposer Code included in description
Last modified: November 23, 2022

---

# Visual COmposer Code included in description

 *  Resolved [mikycoud](https://wordpress.org/support/users/mikycoud/)
 * (@mikycoud)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/visual-composer-code-included-in-description/)
 * Hi,
    Great little plugin you’ve got there, and I just tried the free version 
   to see whether it would be suitable for a client with thousands of products. 
   Before I buy th epremium version though, could you tell me whether there’s a 
   way to fix th eissue I’m having. right now, the description feed included all
   the code generated form Visual Composer extension. See here for instance: [https://spa-institut-nymphea.fr/wp-content/uploads/wppfm-feeds/GMC-Website-Flux.xml](https://spa-institut-nymphea.fr/wp-content/uploads/wppfm-feeds/GMC-Website-Flux.xml)
 * As a result, the Google descrition includes this gibberish in its product description.
   Is there a way to remove this when generating the feed? NB: i’m not talking about
   plain HTML code, but Visual Composer code (or any other visual editor for that
   matter)
 * Thanx for letting me know
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fvisual-composer-code-included-in-description%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/visual-composer-code-included-in-description/#post-16257496)
 * Hi [@mikycoud](https://wordpress.org/support/users/mikycoud/),
 * Sorry for our late response, but thanks for the great question.
 * I had not seen this code before, but it can be removed using this short code 
   snippet:
 *     ```
       function wppfm_strip_short_codes( $attributes, $feed_id, $product_id ) {
   
       	$attributes['description'] = strip_shortcodes( $attributes['description'] );
   
       	// IMPORTANT! Always return the $attributes
       	return $attributes;
       }
   
       add_filter( 'wppfm_feed_item_value', 'wppfm_strip_short_codes', 10, 3 );
       ```
   
 * Let me know if you don’t know how to use this code snippet.
 * If it works correctly I could even implement it in our plugin by default.
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/visual-composer-code-included-in-description/#post-16286084)
 * Hi [@mikycoud](https://wordpress.org/support/users/mikycoud/),
 * Where you able to solve the issue with the code snippet? Can we close your topic?
 *  [somePaulo](https://wordpress.org/support/users/finomeno/)
 * (@finomeno)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/visual-composer-code-included-in-description/#post-16286625)
 * Hi [@michel-jongbloed](https://wordpress.org/support/users/michel-jongbloed/)!
 * I came here because of the same problem. Just tried the code you suggested, but
   it doesn’t work for me. Shortcodes are still there.
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/visual-composer-code-included-in-description/#post-16287646)
 * Hi [@finomeno](https://wordpress.org/support/users/finomeno/),
 * Could you send me a link to your feed so I can have a look what your short codes
   look like in the feed?
 *  Plugin Author [aukemarketing](https://wordpress.org/support/users/aukejomm/)
 * (@aukejomm)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/visual-composer-code-included-in-description/#post-16287965)
 * Hey [@finomeno](https://wordpress.org/support/users/finomeno/),
 * The following snippet should remove Visual Composer markup
 *     ```
       function wppfm_clean_description( $attributes, $feed_id, $product_id ) {
   
       	$attributes['description'] = preg_replace("/\[(\/*)?vc_(.*?)\]/", '', $attributes['description'] );
   
       	// IMPORTANT! Always return the $attributes
       	return $attributes;
       }
   
       add_filter( 'wppfm_feed_item_value', 'wppfm_clean_description', 10, 3 );
       ```
   
 * Could you test that?
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/visual-composer-code-included-in-description/#post-16490145)
 * Hi [@finomeno](https://wordpress.org/support/users/finomeno/),
 * Where you able to solve the issue using the snippet [@aukejomm](https://wordpress.org/support/users/aukejomm/)
   send to you?
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/visual-composer-code-included-in-description/#post-16557535)
 * Hello [@finomeno](https://wordpress.org/support/users/finomeno/),
 * I hope we were successful in helping you resolve your issue with our Feed Manager
   plugin! Since we have not heard back from you in the past weeks and we don’t 
   want to leave tickets open forever, I will now be marking this support topic 
   as resolved. However, if we still haven’t resolved your issue please reach out
   to us as we would be more than happy to further assist you!
 * Thanks and have a great day!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Visual COmposer Code included in description’ is closed to new replies.

 * ![](https://ps.w.org/wp-product-feed-manager/assets/icon-256x256.png?rev=3208464)
 * [WPMR Google Feed Manager for WooCommerce – Sell on Google Merchant Center & Shopping](https://wordpress.org/plugins/wp-product-feed-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-product-feed-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-product-feed-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-product-feed-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-product-feed-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-product-feed-manager/reviews/)

 * 7 replies
 * 4 participants
 * Last reply from: [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/visual-composer-code-included-in-description/#post-16557535)
 * Status: resolved