Title: Plugin breaks get_post_meta function for product variations
Last modified: December 18, 2025

---

# Plugin breaks get_post_meta function for product variations

 *  [Oscar Gare](https://wordpress.org/support/users/oscargare/)
 * (@oscargare)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-breaks-get_post_meta-function-for-product-variations/)
 * Hi there,
   I’ve found that the `WCML_Attributes::filter_product_variation_post_meta_attribute_values_in_current_language`
   function breaks the `get_post_meta` function for product variations. This function
   is a filter callback for the get_post_metadata filter that translates variation
   attributes.The problem is that it returns a value from the cache for all metakeys,
   regardless of whether the metakey is an attribute.
 * This is how you can reproduce the problem:
 *     ```wp-block-code
       $metadata = get_post_meta( $variation_id ); //This call to the filter function stores the meta in the cache.update_post_meta( $variation_id, '_dummy_value', 'val'); // Add a meta for the product variation.$metadata = get_post_meta( $variation_id ); //This should returns all meta data that should include  _dummy_value, but it does not contain it because the WCML_Attributes filter returns a value store in the object cache.
       ```
   
 * A workaround is to clear the cache in the `update_post_meta` action.
 * Could you fix this bug? Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Nicolas V.](https://wordpress.org/support/users/nicolasviallet/)
 * (@nicolasviallet)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-breaks-get_post_meta-function-for-product-variations/#post-18760935)
 * Hi Oscar,
 * Thanks for reporting this issue. I was able to reproduce and verify the behavior
   you described, and I’ll escalate it to the WCML development team. I’ll keep you
   updated once I have their feedback.
 * Thanks again for helping us improve our product!
 *  Plugin Support [Nicolas V.](https://wordpress.org/support/users/nicolasviallet/)
 * (@nicolasviallet)
 * [5 months ago](https://wordpress.org/support/topic/plugin-breaks-get_post_meta-function-for-product-variations/#post-18775061)
 * FYI, our devs are on it, and the issue should be fixed in the next release.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-breaks-get_post_meta-function-for-product-variations%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/woocommerce-multilingual/assets/icon-256x256.png?rev=2937122)
 * [WPML Multilingual & Multicurrency for WooCommerce](https://wordpress.org/plugins/woocommerce-multilingual/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-multilingual/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-multilingual/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Nicolas V.](https://wordpress.org/support/users/nicolasviallet/)
 * Last activity: [5 months ago](https://wordpress.org/support/topic/plugin-breaks-get_post_meta-function-for-product-variations/#post-18775061)
 * Status: not resolved