WooCommerceAPI 1.0.0
dotnet add package WooCommerceAPI --version 1.0.0
NuGet\Install-Package WooCommerceAPI -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WooCommerceAPI" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WooCommerceAPI" Version="1.0.0" />
<PackageReference Include="WooCommerceAPI" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WooCommerceAPI --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WooCommerceAPI, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package WooCommerceAPI@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WooCommerceAPI&version=1.0.0
#tool nuget:?package=WooCommerceAPI&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
WooCommerceAPI
Introduction
This is a new standards compliant library for ecommerce developers. It is under heavy development.
Critical endpoints done
- Create product (simple, variable, metadata)
- Batch create product attribute / variations
- Upload media (wordpress)
- List all products
- Update a product
Next
- Delete a product
- Update product variations
- Delete product variations
- Update a media item
- Create a product category
- List all product categories
- List all orders
- Update an order
- Get an order
Hello World
using WooCommerceAPI.Clients.WooCommerces;
using WooCommerceAPI.Models.Configurations;
using WooCommerceAPI.Models.Services.Foundations.Products;
using dotenv.net;
DotEnv.Load(options: new DotEnvOptions(envFilePaths: new[] { "../../../.env" }));
var wooCommerceConfigurations = new WooCommerceConfigurations
{
ApiKey = Environment.GetEnvironmentVariable("WC_CONSUMER_KEY"),
ApiSecret = Environment.GetEnvironmentVariable("WC_CONSUMER_SECRET"),
ApiUrl = Environment.GetEnvironmentVariable("WC_STORE_URL")
};
var wooCommerceClient = new WooCommerceClient(wooCommerceConfigurations);
ProductAttribute[] a = new ProductAttribute[3];
var inputProduct = new Product
{
Request = new ProductRequest
{
Name = "name 5",
Type = "simple",
RegularPrice = "10",
//Attributes = a
}
};
Product result = await wooCommerceClient.Products.SendProductAsync(inputProduct);
Console.WriteLine(result.Response.Name);
Acknowledgements
Thanks to hassanhabib for the coding Standard.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- RESTFulSense (>= 2.16.0)
- System.Net.Http (>= 4.3.4)
- System.Text.RegularExpressions (>= 4.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 220 | 1/14/2024 |
| 1.0.0-alpha1 | 119 | 1/14/2024 |