Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Debug SOAP requests
<?php
/**
* Debug SOAP requests
*/
$client = new SoapClient(
'http://example.loc/index.php/api/v2_soap/?wsdl'
);
// Set yourself debug session cookie, for Xdebug and Phpstorm
$client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');
$session = $client->login('user', 'key');
$productId = '123456';
$stockItemData = array(
'qty' => '123',
'is_in_stock ' => 1,
'manage_stock ' => 1
);
$result = $client->catalogInventoryStockItemUpdate($session, $productId, $stockItemData);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment