WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A little background about my issue: I'm running WP + WooCommerce + Gravity Forms and want to enable users to create WC digital-virtual-downloadable products from the frontend using GF. Essentially, users upload audio files using GF's Custom Field values (File Uploads) with mp3 as the meta key (the file path/URL to the uploaded file is the meta value).

Since WC stores digital products as post meta fields, as well, under the _file_paths meta key, I thought I could go that route, but it turns out that it's not as simple as that. The meta value for WC's _file_paths is actually stored as an array with an MD5 hash.

My questions is, how do I duplicate the mp3 meta value under the WC's _file_paths meta key and store it as an array with that md5 hash. Alternatively, if there's another way to accomplish this, I'm totally open to that, as well (ie. store meta value as an array under _file_paths meta key and somehow throw in that hash).

Here's something that might help with the answer - http://docs.wedevs.com/woocommerce-downloadable-product/

share|improve this question

closed as off-topic by Mark Kaplun, birgire, mrwweb, Johannes Pille, Pieter Goosen Sep 2 '14 at 4:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – Mark Kaplun, birgire, mrwweb, Johannes Pille, Pieter Goosen
If this question can be reworded to fit the rules in the help center, please edit the question.

Without coding the whole thing yourself, this sounds like what the Cred plugin was written to do. Using the Toolset suite is, of course, limiting compared to doing everything hands-on but the trade-offs in terms of deployment time are pretty massive.

If you want to get down with a lot of hand coding, there are tutorials on how to do what you are asking.

Yoast also talked a bit about updating custom post types using Gravity a while back (without code).

Whatever avenue you chose, it's not going to be a 10 minute solution.

share|improve this answer
I looked into that, as well, before going with GF. I actually had this working using WPUF and the linked snippet, but somehow it no longer works with the latest release of WC. GF gives you a lot more granularity in what you can do, so I thought I'd ask around, hoping for that 10 minute solution ;-) I'll probably just wait till WPUF resolves that issues and try to go that route instead. Thanks for the feedback! – Michael Kuhlmann Oct 9 '13 at 19:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.