Forum Replies Created

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)