Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3332569
Variation Description Not Showing
Open

Comments

  •  3
    Jan started the conversation

    Hi :-)

    I created a composite product where one component is a variation product.

    Each variation has its own description.

    How can I make the variation description appear in the composite product?

    Attached files:  Composite-Product.png
      Variation-Backend.png
      Variation-Frontend.png

  •  767
    Janilyn replied

    Hi Jan,

    Thanks for contacting WPClever Support Forum. We're not available at the weekends so today (Monday) I am able to process your ticket.

    We’ve received your ticket and assigned one of our developers to help you with that. 

    He’ll be looking into your question and responding with specific instructions as soon as possible. 

    Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.

    Best regards.

    Janilyn T. - WPClever Support Agent

  •  1,281
    Dustin replied

    Hi Jan,

    Please add the below custom code (How to add custom code?)

    add_filter( 'wooco_product_description', function ( $desc, $product ) {
        if ( $product->is_type( 'variation' ) ) {
            return '<div class="wooco-product-desc wooco-variation-desc" style="white-space: break-spaces !important;">' . $product->get_description() . '</div>' . $desc;
        } else {
            return '<div class="wooco-product-desc" style="white-space: break-spaces !important;">' . $product->get_short_description() . '</div>' . $desc;
        }
    }, 99, 2 );

    And the result https://www.screencast.com/t/EGBsx53nSQu

    Best regards,
    Dustin

  •  3
    Jan replied

    Hi Dustin,

    thanks for your reply.

    Your solution works, thanks!

    Have a great day. :-)