我正在将产品从 WooCommerce 导出到 .csv,但描述字段显示 html 标签并且位于多行:screenshot
我需要从 html 标记和转义码中删除任何字段,以便它只在一行上。
我在我的主题的functions.php中尝试了一个函数,但它不起作用:
add_filter( 'woe_fetch_order', function($rec ,$order) {
array_walk_recursive($rec, function(&$a) {
$a = strip_tags($a);
} );
return $rec;
}, 10, 2);