KangOnRails
KangOnRails

Reputation: 143

Woocommerce variable product short description tags not working

Okay,

So on the simple product short description, you are able to use html tags and codes like
and so on. But when I try to do that with variable product short description it does not work.. I need to get this https://gloriblends.com/product/capsules-dream-sleep/

When you click the 7 Days to say Ingredient: all on this line and as follow then Coupons Excluded From This Product - this needs to be on another like otherwise it looks very bad. But anytime i use
it does not work

Maybe the only way to do this would be to create a php script in the variable product php file? I am not sure

Upvotes: 2

Views: 485

Answers (1)

Hamza Ahmad
Hamza Ahmad

Reputation: 545

Try adding the code below in your active child-theme's functions.php

foreach ( array( 'pre_term_description' ) as $filter ) {
    remove_filter( $filter, 'wp_filter_kses' );
}

foreach ( array( 'term_description' ) as $filter ) {
    remove_filter( $filter, 'wp_kses_data' );
}

The code above will tell WooCommerce to stop stripping the HTML.

Always put custom code in the child-theme, otherwise you will lose your edits when the theme updates.

Hope this helps.

Upvotes: 2

Related Questions