• Hi, I am using the default Product CSV Import module, all latest WC and WP versions. I have added an extra custom column using the three filters described here and save it as meta data. Everything works fine for regular data, however..

    One of the columns contains a script tag with a video player, such as:
    <script src="//content.jwplatform.com/players/-redacted-.js"></script>
    which I need saved as a meta data exactly how it appears in the CSV.

    I am unable to import this column, as the <script> simply gets removed/sanitized for whatever reason? If I wrap the <script> into random text, it seems to go through.

    My question is, what are the rules for sanitizing the $data param in the following filters:

    woocommerce_product_import_pre_insert_product_object
    woocommerce_product_import_inserted_product_object

    and is there any way to turn it off? I would prefer total control over the data coming from the CSV, even if its a raw HTML/JS.

    Thank you.

The topic ‘Product CSV Import stripping/sanitizing HTML code?’ is closed to new replies.