Hide variation from cart item title in WooCommerce
1 min read

Hide variation from cart item title in WooCommerce

If you link up WooCommerce to, say, an ERP it can be better to not export the variation in the title, which is the default behaviour of WooCommerce since version 3 (if you have only one variation; two and more revert to the default pre-v3 behaviour).

The filter for this is:

add_filter( 'woocommerce_product_variation_title_include_attributes', '__return_false' );

The source is LoicTheAztec on Stackoverflow.