-
Notifications
You must be signed in to change notification settings - Fork 66
Product_Update
2Checkout's back office API allows you to retrieve product information. You must specify your API username and password using the the Twocheckout::setCredentials method before calling a method in this class. The Twocheckout_Product class provides methods to create, retrieve, update and delete products and will return a JSON object or array depending on your specification.
##Method
###update
Use to update and existing product.
####Arguments
-
array Array
-
Array containing update_product parameters in key => value pairs. Parameters -> API Update Product
-
string format
-
Supports 'json' or 'array'. Defines response format. Default: 'json'
####Returns
Returns a JSON object or array depending on your specification.
####Example Usage:
<?php
Twocheckout::setCredentials("APIuser1817037", "APIpass1817037");
$args = array(
'product_id' => 4838125968,
'name' => 'New Product Name'
);
$result = Twocheckout_Product::update($args, 'array');
print_r($result);
####Example Response:
Array
(
[assigned_product_id] => 445
[product_id] => 4838125968
[response_code] => OK
[response_message] => Product successfully updated
)
Please feel free to contact 2Checkout directly for assistance with your integration.