wp multilang and woocommerce product attributes
-
I have a very simple wordpress + woocommerce site and products with variations.
First problem I solved myself is the following: on changing the dropdown options in the product page on the user side, when one adds to cart the options in the dropdown get messed but this can be solved by adding:add_filter( 'woocommerce_variation_option_name', 'wpm_translate_string' );
unfortunately, the same is not true for product with variations in the cart, so I had to create my own function like following:
add_filter( 'woocommerce_cart_item_name', array( $this, 'wpm_translate_string_cart_item_name' ) , 10 , 2 );
I noticed that the next filter hook is troublesome and conflicts with the above hooks
add_filter( 'woocommerce_is_attribute_in_product_name', '__return_true' );
while this one below has no side effects:
add_filter( 'woocommerce_product_variation_title_include_attributes', '__return_false' );
The thread https://github.com/qtranslate/qtranslate-xt/issues/612 shows that there are indeed problems translating products with variations.
To me, there should be something like woocommerce_attribute_VALUE besides woocommerce_attribute_label and woocommerce_attribute_taxonomies to help out at least for global attributes.In fact
add_filter( 'woocommerce_attribute', 'wpm_translate_string' );
is not being effective.- This topic was modified 4 years ago by .
- This topic was modified 4 years ago by .
- This topic was modified 4 years ago by .
- This topic was modified 4 years ago by .
- This topic was modified 4 years ago by .
- This topic was modified 4 years ago by .
- This topic was modified 4 years ago by .
- This topic was modified 4 years ago by .
- The topic ‘wp multilang and woocommerce product attributes’ is closed to new replies.