Cmdlets for WooCommerce

Build 20.0.7654

Update-WooCommerce Cmdlet

Parameters   Output Objects  

Updates WooCommerce data.


Update-WooCommerce [parameters]


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/wordpress/'
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")

Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 20.0.7654