Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Darcy

Exported Columns have markup

After switching to HPOS for WooCommerce, I have had to rebuild all my columns. I have found several columns in Orders have markup when exported them to CSV, which doesn’t make sense. Is this a bug that can be fixed or is there a hook I can use to remove the markup?

Specifically the columms Default > Date (has <time></time> surrounding it) and Default Total (has <span class=”woocommerce-Price-amount amount”></span> surrounding it)

11 months ago
Stefan van den Dungen Gronovius
Developer

Thanks for your feedback. We will have another look at the default columns.
You should be able to alter the value with a hook and a simple implementation that will all column from third-party plugins, should look like this.

add_filter('ac/export/value', function ($value, AC\Column $column, $id) {
    if ($column->is_original()) {
        return strip_tags($value);
    }

    return $value;
}, 10, 3);
11 months ago

You must be logged in to reply to this topic.