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

Okay
  Public Ticket #3134955
Drop down variables
Closed

Comments

  • Darren started the conversation

    Hi, is it possible to change the name of the variations in the drop down to the actual attributes?

    I want the drop down to say blue, black, pink etc. rather than the full product name.

  •  767
    Janilyn replied

    Hi Darren,

    Thank you for contacting WPClever Support Forum. 

    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 if that is 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

  •  153
    Henry replied

    Hi,

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

    // Wpclever team support ticket-3134955
    add_filter('wooco_product_data', function($product_data, $product){
        if( $product->is_type( 'variation' ) ){
            $product_data['name'] = wc_get_formatted_variation( $product, true, false );
        }
        return $product_data;
    }, 99, 2);

    It is like this: https://www.screencast.com/t/8HJDXFehzyQ

    Best regards,
    Henry N.