• Resolved mikycoud

    (@mikycoud)


    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

    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 to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hi @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

    (@michel-jongbloed)

    Hi @mikycoud,

    Where you able to solve the issue with the code snippet? Can we close your topic?

    Hi @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

    (@michel-jongbloed)

    Hi @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 AukeJomm

    (@aukejomm)

    Hey @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

    (@michel-jongbloed)

    Hi @finomeno,

    Where you able to solve the issue using the snippet @aukejomm send to you?

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hello @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.