[wp-xmlrpc] Hidden Custom Fields - Ruby

Bradly Swart brad8711 at gmail.com
Sun Dec 23 22:41:02 UTC 2012


Hi List,

I've been putting around the net over the past few days figuring out how to
get xmlrpc working with ruby. I'm trying to do some programmatic insertion
of products into a WooCommerce site. Running the latest version of
Wordpress. I've read some stuff on add_post_meta() but hasnt helped.

I've managed to get the posting working, as well as custom fields, the
problem has come in with hidden fields. In the snippet bellow product_url
works fine, _sku doesn't

snippet as part of the post content:
-------------------------------------------------------------------------------------------------------------------------
'custom_fields' => [{'key' => 'product_url', 'value' => '
http://mysite.com?rsid=9999'},
                      {'key' => "_sku", 'value' =>  '9999'}]
-------------------------------------------------------------------------------------------------------------------------

XMLRPC Call:
-------------------------------------------------------------------------------------------------------------------------
post_id = connection.call(
  'metaWeblog.newPost',
  1,
  'user',
  'password',
  post,
  true
)
-------------------------------------------------------------------------------------------------------------------------

Hoping someone can help me out.

Bradly Swart

Mobile: +61447068962
Skype: bradly.swart
Twitter: @brad8711 <http://twitter.com/brad8711>
linkedIn: http://za.linkedin.com/in/bradlyswart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.automattic.com/pipermail/wp-xmlrpc/attachments/20121224/c0cd8e21/attachment.htm>


More information about the wp-xmlrpc mailing list