• Hi all, I wondered if there was any solution to the issue I am having.

    My products are all variable products which includes the description of the product which is fine but I need to list some of the products by type so I am using smart composite plugin and pulling the items from the variable listings.

    The issue is that when viewing the composite products it will show the main description rather than pull the description from the variable product which I would like to display. Is there a way to change the description depending on what is selected in the drop down menu?

    The page im working on is https://www.scentbunny.com/bunny-wax-melts/

Viewing 1 replies (of 1 total)
  • Thread Starter aislingn3

    (@aislingn3)

    I have found some code i thought might solve the issue here in the forum but it seems to be pulling the long description of the current product, how can I change this to short description of the variable?

    add_filter( 'wooco_product_description', 'your_wooco_product_description', 99, 2 );
    function your_wooco_product_description( $desc, $product ) {
    	if ( $product->is_type( 'variation' ) ) {
    		return '<div class="wooco-variation-desc">' . $product->get_description() . '</div>' . $desc;
    	}
    
    	return $desc;
    }
    • This reply was modified 2 years, 3 months ago by aislingn3.
Viewing 1 replies (of 1 total)
  • The topic ‘Product description’ is closed to new replies.