Skip to content

tsubotitsch/WooCommercePS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

WooCommercePS

WooCommercePS Logo

PowerShell Gallery Version PowerShell Gallery Downloads Platform GitHub Issues

PowerShell module for managing the WooCommerce shop system

For detailed API reference, see the WooCommerce API documentation.

Functions

First Steps

Getting an API Key

First, you'll need an API key from your WooCommerce account:

  1. Log in to your WooCommerce admin dashboard.
  2. Navigate to WooCommerce > Settings > Advanced > REST API.
  3. Click on "Add Key".
  4. Fill in the description, select the user, and set permissions to "Read/Write".
  5. Click "Generate API Key" and note down the Consumer Key and Consumer Secret.
  6. Use these credentials to connect to the WooCommerce API from PowerShell.
  7. You can use the Connect-WooCommerce function to establish a connection using your API credentials.

Example:

$ConnectParams = @{
    ConsumerKey    = "your_consumer_key"
    ConsumerSecret = "your_consumer_secret"
    StoreUrl       = "https://yourstore.com"
}
Connect-WooCommerce @ConnectParams

Example Usage

# Get a product by ID
Get-WooCommerceProduct -Id 123

# Create a new simple product with a regular price of 19.99.
$NewProductParams = @{
      Name        = "New Product"
      Type        = "simple"
      RegularPrice = "19.99"
      Description = "A new product description."
}
New-WooCommerceProduct @NewProductParams

About

PowerShell module for managing the WooCommerce shop system

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors