I need to append a default text block to each product description (same text for each and every product) in WooCommerce. So I've created simple plugin which adds new settings field as rich text editor (wp_editor
) into "WooCommerce > Settings > Catalog" tab.
All works fine and I can enter/save plain text, but it strips any HTML tags. I believe tags are stripped by woocommerce_clean
in settings-save.php
if ( isset( $value['id'] ) && isset( $_POST[$value['id']] ) ) {
update_option($value['id'], woocommerce_clean($_POST[$value['id']]));
} elseif( isset( $value['id'] ) ) {
delete_option($value['id']);
}
How can this be fixed without changing core code?