-1

I have couple of variable products. When someone order product, some product displey in new variation format (where order atributes are in title). Image: https://user-images.githubusercontent.com/10392998/29421924-9133df64-8344-11e7-8ee4-b2fd937afb72.png

– And other disply whit old variation format (where product atributes are in description) Image: https://user-images.githubusercontent.com/10392998/29421925-913bbcfc-8344-11e7-9d3d-54ab7e4a6962.png

How can i display all order in old variation format ?

Thanks

0

This requires a little bit of code to be placed in functions.php. If you want you can use a plugin like WP-Designer to do that.

The WooCommerce filter 'woocommerce_product_variation_title' uses 4 arguments which are self-explanatory in the following piece of code which you can use in you functions.php. I tried it on my install and it works just fine.

add_filter( 'woocommerce_product_variation_title', 'wooc_product_variation_fix', 10,  4);

function wooc_product_variation_fix( $maybe_suffix, $product, $title_base, $title_suffix ) {

return $title_base;
}
  • Thank you for reply !!! I'am really new to wordpress, i should add this i woocommerce functions.php or theme functions.php ? On some orders i have old variation format and on some new variation format. Its look like old prodct have old format, and products that i add last have new format. After add this all products will have old format ? Thank You soo much and sorry for my bad english. – Dragnet Pro Mar 14 '18 at 10:32
  • You can add them to theme's function.php – Shivanand Sharma Mar 18 '18 at 17:23
  • Thanks, i allredy add this: ` add_filter( 'woocommerce_product_variation_title_include_attributes', '__return_false' ); add_filter( 'woocommerce_is_attribute_in_product_name', '__return_false' ); ` and i wait for new orders (this is not working for old orders ?), if i not work i will try whit code above,Thank You soo much – Dragnet Pro Mar 19 '18 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.