• ragulka

    (@ragulka)


    I discovered a bug in inc/products.class.php in the duplicate_product_post_meta function. Since post meta may also be serialized data , it is important to maybe_unserialize the $meta_value because otherwise it will get serialized twice and will no longer work for the translated product.

    Adding

    $meta_value = maybe_unserialize( $meta_value );

    between lines 615 and 616 will fix this issue.

    https://www.ads-software.com/plugins/woocommerce-multilingual/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Amit Kvint

    (@webifish)

    Hi there – thanks!

    Can you please let me know the versions you are using, I think we might have had a fix for that already in the last versions.

    Cheers!

    Thread Starter ragulka

    (@ragulka)

    I’m having this issue with 3.0 and 3.0.1

    Hi ragulka,

    Can you describe when is it happening to you? It would help us replicate the issue if you can tell us what fields are you using. This way we’ll be sure to cover all cases in next releases. ??

    Thanks!

    Thread Starter ragulka

    (@ragulka)

    I am facing this issue when using WooCommerce Dynamic Pricing. It stores price groups as serialized data on post meta. But I would face it whenever I would store any serialized data in post meta.

    It doesn’t make sense to exclusively maybe_unserialize a few fields based on their names (like you are doing with _file_paths) because you never know what kind of information users might store in custom meta fields.

    You should simply maybe_unserialize all post meta fields. Keep in mind that get_post_meta does NOT unserialize any serialized values.

    Hi ragulka,

    Thanks for your feedback. We will surely keep it in mind! ??

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘duplicate_product_post_meta should use maybe_unserialize for meta values’ is closed to new replies.