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

Okay
  Public Ticket #3958467
Show Full Name of variation product
Open

Comments

  •  1
    Javier started the conversation

    When I select individual variations, it only shows the parent product name (Uniform Shirt) But I want it to show the full name (Uniform Shirt - M, Female). How can I do this

  •  1,468
    Dustin replied

    Hi Javier,

    In some cases, WooCommerce doesn’t show the attributes in the product name https://www.screencast.com/t/iU3bq77n.

    Please add the custom code below to fix it. (How to add custom code? ↗):

    add_filter( 'woocommerce_product_variation_title_include_attributes', '__return_true', 99 );

    Best regards,
    Dustin

  •  1
    Javier replied

    THanks! is it possible to add a SPAN tag to the variation part. I want to style that  to make it stand out.

  •  1,468
    Dustin replied

    Please try this snippet:

    add_filter( 'woocommerce_product_variation_title', function ( $title, $product, $title_base, $title_suffix ) {
    	$separator = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', $product );
    
    	return $title_base . $separator . '<span>' . $title_suffix . '</span>';
    }, 99, 4 );

    Best regards,
    Dustin

  •  1
    Javier replied

    Works Thanks!. I was confused,  but I realized  had to use both snippets

  •  1,468
    Dustin replied

    You're welcome!

    If you are satisfied with our plugin and support, please reward it with a full five-star ★★★★★ rating.
    https://wordpress.org/support/plugin/woo-product-bundle/reviews?rate=5#new-post
    Thank you in advance! ♥

    Best regards,
    Dustin