Let WooCommerce Set The Variation Title Automatically

WooCommerce has the ability to automatically generate titles for each variation by appending the product attributes to the parent product’s title. You might have seen it on a cart page:

example of titles being applied automatically

You can leverage this feature of WooCommerce when using Show Single Variations too. So you would not need to manually edit title for each variation manually and still each product will have a unique title. To do this, you just need to add this snippet to the functions.php of your theme/child theme.

/**
 * Disable Title override for Iconic Show Single Variations.
 *
 */
function iconic_ssv_disable_title() {
	global $jck_wssv;

	remove_filter( 'the_title', array( $jck_wssv, 'change_variation_title' ), 10 );
}
add_action( 'init', 'iconic_ssv_disable_title', 11 );

It’s worth noting that WooCommerce would generate dynamic title for product with 2 or less attributes. If you want to enable dynamic title generation for all product, add this code snippet too: 

 add_filter( 'woocommerce_product_variation_title_include_attributes', '__return_true' );

Please also note that after adding this snippet you loose the ability to edit title for individual variations.

WooCommerce Show Single Variations

Display individual product variations of a variable product in your product listings. Make it easy for your customers to view and filter product variations.

Was this helpful?

Please let us know if this article was useful. It is the best way to ensure our documentation is as helpful as possible.