admin管理员组文章数量:1130349
So I'm working on a monster script to port all of our existing stuff from Joomla/Virtuemart to Wordpress/WooCommerce.
So far I've got just about everything done with moving over our product categories and products, I just need to figure out the structure of the _downloadable_files postmeta.
Using this as an example:
a:1:{s:32:"ded830cf64e3c42c4f7ac5aecd7c5c86";a:2:{s:4:"name";s:0:"";s:4:"file";s:114:"http://localhost/wp-content/uploads/woocommerce_uploads/2014/09/test-file.pdf";}}
How is the s:114 just before the file url generated? That is the only part that changes that I don't know how to generate.
Any suggestions would be greatly appreciated!
So I'm working on a monster script to port all of our existing stuff from Joomla/Virtuemart to Wordpress/WooCommerce.
So far I've got just about everything done with moving over our product categories and products, I just need to figure out the structure of the _downloadable_files postmeta.
Using this as an example:
a:1:{s:32:"ded830cf64e3c42c4f7ac5aecd7c5c86";a:2:{s:4:"name";s:0:"";s:4:"file";s:114:"http://localhost/wp-content/uploads/woocommerce_uploads/2014/09/test-file.pdf";}}
How is the s:114 just before the file url generated? That is the only part that changes that I don't know how to generate.
Any suggestions would be greatly appreciated!
Share Improve this question edited Jul 23, 2015 at 16:42 Pieter Goosen 55.5k23 gold badges117 silver badges211 bronze badges asked Jul 23, 2015 at 16:01 JakeJake 133 bronze badges1 Answer
Reset to default 1In short, this is serialized data and this is how data is stored from a custom field (and many other datastrings) in the db.
s:114 is auto generated and simply means that the value http://localhost/wp-content/uploads/woocommerce_uploads/2014/09/test-file.pdf is a string and is 114 characters long. This is used when the data is read and used. If the URL value changes, the string length will change as the length of the string changes
You will need to go and have a look at data serializing and unserializing
So I'm working on a monster script to port all of our existing stuff from Joomla/Virtuemart to Wordpress/WooCommerce.
So far I've got just about everything done with moving over our product categories and products, I just need to figure out the structure of the _downloadable_files postmeta.
Using this as an example:
a:1:{s:32:"ded830cf64e3c42c4f7ac5aecd7c5c86";a:2:{s:4:"name";s:0:"";s:4:"file";s:114:"http://localhost/wp-content/uploads/woocommerce_uploads/2014/09/test-file.pdf";}}
How is the s:114 just before the file url generated? That is the only part that changes that I don't know how to generate.
Any suggestions would be greatly appreciated!
So I'm working on a monster script to port all of our existing stuff from Joomla/Virtuemart to Wordpress/WooCommerce.
So far I've got just about everything done with moving over our product categories and products, I just need to figure out the structure of the _downloadable_files postmeta.
Using this as an example:
a:1:{s:32:"ded830cf64e3c42c4f7ac5aecd7c5c86";a:2:{s:4:"name";s:0:"";s:4:"file";s:114:"http://localhost/wp-content/uploads/woocommerce_uploads/2014/09/test-file.pdf";}}
How is the s:114 just before the file url generated? That is the only part that changes that I don't know how to generate.
Any suggestions would be greatly appreciated!
Share Improve this question edited Jul 23, 2015 at 16:42 Pieter Goosen 55.5k23 gold badges117 silver badges211 bronze badges asked Jul 23, 2015 at 16:01 JakeJake 133 bronze badges1 Answer
Reset to default 1In short, this is serialized data and this is how data is stored from a custom field (and many other datastrings) in the db.
s:114 is auto generated and simply means that the value http://localhost/wp-content/uploads/woocommerce_uploads/2014/09/test-file.pdf is a string and is 114 characters long. This is used when the data is read and used. If the URL value changes, the string length will change as the length of the string changes
You will need to go and have a look at data serializing and unserializing
本文标签: databaseStructure of postmeta metavalue for woocommerce product download
版权声明:本文标题:database - Structure of postmeta meta_value for woocommerce product download 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749081878a2313172.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论