{"action":"closed","issue":{"url":"https://api.github.com/repos/skyverge/woocommerce-sage-erp-connector/issues/6","labels_url":"https://api.github.com/repos/skyverge/woocommerce-sage-erp-connector/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/skyverge/woocommerce-sage-erp-connector/issues/6/comments","events_url":"https://api.github.com/repos/skyverge/woocommerce-sage-erp-connector/issues/6/events","html_url":"https://github.com/skyverge/woocommerce-sage-erp-connector/issues/6","id":123726915,"number":6,"title":"update_sales_order doesn't seem to work","user":{"login":"nikolov-tmw","id":1839144,"avatar_url":"https://avatars.githubusercontent.com/u/1839144?v=3","gravatar_id":"","url":"https://api.github.com/users/nikolov-tmw","html_url":"https://github.com/nikolov-tmw","followers_url":"https://api.github.com/users/nikolov-tmw/followers","following_url":"https://api.github.com/users/nikolov-tmw/following{/other_user}","gists_url":"https://api.github.com/users/nikolov-tmw/gists{/gist_id}","starred_url":"https://api.github.com/users/nikolov-tmw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikolov-tmw/subscriptions","organizations_url":"https://api.github.com/users/nikolov-tmw/orgs","repos_url":"https://api.github.com/users/nikolov-tmw/repos","events_url":"https://api.github.com/users/nikolov-tmw/events{/privacy}","received_events_url":"https://api.github.com/users/nikolov-tmw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-23T21:41:47Z","updated_at":"2015-12-28T18:14:33Z","closed_at":"2015-12-28T18:14:33Z","body":"Hi there, I'm using your plugin and it works great(whatever data is not there is really easy to add with the filters).\r\n\r\nI had to update a sales order once it was created in Sage(for some reason some properties were getting overwritten during creation) and so I used this code:\r\n\r\n    global $wc_sage_erp_connector;\r\n\r\n    $sales_order = (object) array(\r\n    \t'SalesOrderNo' => $sales_order_no,\r\n    \t'CheckNoForDeposit' => $last_four,\r\n    \t'FreightAmt' => $freight_amount,\r\n    );\r\n\r\n    require_once( $wc_sage_erp_connector->get_plugin_path() . '/classes/class-wc-sage-erp-connector-api.php' );\r\n\r\n    // init API\r\n    $api = new WC_Sage_ERP_Connector_API( $wc_sage_erp_connector->integration->api_endpoint,$wc_sage_erp_connector->integration->api_username, $wc_sage_erp_connector->integration->api_password, $wc_sage_erp_connector->integration->company_code );\r\n\r\n    try {\r\n    \t$api->update_sales_order( $sales_order_no, $sales_order );\r\n    } catch (SoapFault $e) {\r\n    \terror_log( 'Error updating FreightAmt for SalesOrder ' . $sales_order_no . '. Error is: ' . $e->getMessage() );\r\n    }\r\n\r\nHowever it gave me the following error: `The salesOrder parameter is null.`. So I went in `class-wc-sage-erp-connector-api.php` and changed the `update_sales_order()` function to this:\r\n\r\n    $this->get_connection()->UpdateSalesOrder( array(\r\n    \t\t'logon'        => $this->get_logon(),\r\n    \t\t'companyCode'  => $this->company_code,\r\n    \t\t'salesOrderNo' => $sales_order_no,\r\n    \t\t'salesOrder'   => $value,\r\n    \t)\r\n    );\r\n\r\nAnd everything works properly now.\r\n\r\nDo you want me to create a PR for this bug? With the holidays it might take me a few days to get it submitted, but it won't be a problem for me."}}