Update-WooCommerce Cmdlet
Updates WooCommerce data.
Syntax
Update-WooCommerce [parameters]
Remarks
The Update-WooCommerce cmdlet allows you to use a syntax similar to SQL UPDATE statements to update WooCommerce data.
$conn = Connect-WooCommerce -ConsumerKey 'ConsumerKey' -ConsumerSecret 'ConsumerSecret' -Url 'http://localhost/woocommerce/' Update-WooCommerce -Connection $conn -Table "Orders" -Columns @("Total") -Values @("Jon Doe") -Id "6"The Where parameter can also be used to specify the primary key of the table:
Update-WooCommerce -Connection $conn -Table "Orders" -Columns @("Total") -Values @("Jon Doe") -Where "Id = '6'"The primary key can also be passed to the cmdlet along the pipeline:
Select-WooCommerce -Connection $conn -Table Orders -Where "ParentId = '3'" | Update-WooCommerce -Columns @("ParentId") -Values @("3 2")