Create an API using Pods

This topic is: not resolved

This topic contains 0 replies, has 1 voice, and was last updated by  sc0ttkclark 4 years, 4 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #158380

    sc0ttkclark
    Keymaster
    Post count: 800

    This may give you some cool ideas of what’s possible. Thanks to Jeremy Visser for this code! It’s just example code though, and hasn’t been tested by me, just wanted to post is so it was here for all you developers who are looking to migrate data into Pods (until the API is complete and ready). <pre><?php
    $product_post = array(
    ‘columns’ => ‘a:26:{i:0;s:[...serialized data...]‘,
    ‘datatype’ => ‘product’,
    ‘save’ => 1,
    );
    $attributes = array(
    ‘name’ => $r['label'],
    ‘price’ => $r['price'],
    ‘description’ => $r['description'],
    [...etc] );
    do_http_post("$wp_siteurl/wp-content/plugins/pods/ajax/showform.php", array_merge($product_post, $attributes));
    ?></pre>

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Wordpress Cloud Hosting