WordPress.org

Forums

WooCommerce - excelling eCommerce
Insert file path for downloadable product automatically getting double serialize (1 post)

  1. peteincali2103
    Member
    Posted 1 year ago #

    Hi everyone. I am having regarding add_post_meta / update_post_meta double serializing a serialized string that is pre constructed.

    Basically I am trying to insert a preserialized string using add_post_meta to a product automatically when another post type is created. However, the string is getting double serialized, so for example, the preserialized string is:

    a:1:{s:32:"pH98SYKFExGdZvJfM4rtgN2cC16ARkqB";s:54:"file_path";}

    Turns in to:

    s:97:"
    a:1:{s:32:"pH98SYKFExGdZvJfM4rtgN2cC16ARkqB";s:54:"file_path";}
    ";

    I realize that add post meta is supposed to serialize data for you automatically, but I just want to insert the string as is. Does anyone have any idea how I can do this?

    http://wordpress.org/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic