如何使用WooCommerce-REST-API-Client-Library添加,更新类别woo comers?

时间:2015-09-18 09:34:24

标签: php api woocommerce

我试过但没有结果请帮忙解决这个问题,它提供了一些未知的错误消息

<?php

/* api for adding category from crowdchane to crowd shop */
require_once( '../lib/woocommerce-api.php' );
$options = array(
    'ssl_verify' => false,
);
$client = new WC_API_Client('http://localhost/shop/', "ck_78ec2a410a8407549bdd31d84b31cd84", "cs_56af7cbb9dcacda8d82f246ce3d60185", $options);
$or = $client->products->get();
print_r(json_encode($or));

$data = array('categories' => array(11, 14));
$res = $client->products->create($data);
print_r($res);
?>

0 个答案:

没有答案