-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit_product.php
25 lines (20 loc) · 986 Bytes
/
edit_product.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
include(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'bootstrap.php');
try {
$response = $api->manage->edit_product(array(
# int numeric ID of the product (required)
'product_id' => PRODUCT_ID,
# string|null new name for the product
# (optional; will not change name if null or empty string is passed)
'name' => null,
# array list of numeric colour IDs to make available for the product
# (optional; will not change colours if empty array is passed)
'colours' => array(),
# int|null numeric ID of the colour which is displayed by deafult
# (optional; will not change featured colour if null or empty string id passed)
'featured_colour' => null,
));
debug($response);
} catch (Exception $e) {
echo $e->getMessage();
}