• Resolved CRE8

    (@cre8gr)


    Hello,

    We’re using your plugin for generating an XML file for Facebook/Instagram shop. Up until a few weeks all products were working, although they had an error saying that the description of the product should not have HTML code in it. I guess something changed from Facebook and now all products are not active.

    For the description we are using a custom attribute created by us and Product Feed PRO recognizes it and displays it fine in the XML. The issue is that it doesn’t strip all the HTML code we have in this field so Facebook won’t accept the products. How can we strip all HTML from custom attribute fields so the generated XML file is free of HTML in the description field?

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    Thanks for using our plugin and reaching out to us.

    Our plugin only has attributes available to strip out HTML and short codes for the normal product description and short product description. Unfortunately it can’t do it for other attributes or custom fields.

    Thread Starter CRE8

    (@cre8gr)

    I managed to fix the problem.

    In the file class-get-products.php at about line 3276, find:

    $product_data[$new_key] = $custom_value;

    Replace it with:

    $product_data[$new_key] = strip_tags($custom_value);

    It successfully strip tags for custom attributes. Could you please add it to the next version of the plugin, so other people using custom attributes can benefit from that?

    Hi,

    Unfortunately we cannot just add that to the next version of the plugin as some of users actually do want to have HTML and shortcodes in their feed. If we would just bluntly add it than it would break their feeds.

    Thread Starter CRE8

    (@cre8gr)

    OK got it thanks.

    Is it possible to activate this function with a checkbox in the settings? Then everyone will be happy and there is no need to go into the plugin code.

    Assuming the issue at hand has been resolved or our support is no longer required I am going to close this topic for housekeeping reasons now. Please do not hesitate to reach out to our support-team again whenever you need our help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Strip HTML from Custom Attribute’ is closed to new replies.