WooCommerceNetExtensions 0.8.7
See the version list below for details.
dotnet add package WooCommerceNetExtensions --version 0.8.7
NuGet\Install-Package WooCommerceNetExtensions -Version 0.8.7
<PackageReference Include="WooCommerceNetExtensions" Version="0.8.7" />
paket add WooCommerceNetExtensions --version 0.8.7
#r "nuget: WooCommerceNetExtensions, 0.8.7"
// Install WooCommerceNetExtensions as a Cake Addin #addin nuget:?package=WooCommerceNetExtensions&version=0.8.7 // Install WooCommerceNetExtensions as a Cake Tool #tool nuget:?package=WooCommerceNetExtensions&version=0.8.7
WooCommerce.NET
A Brief Intro
WooCommerce.NET is a .NET library for calling WooCommerce/WordPress REST API with OAuth/JWT in .NET applications.
NOTE: This library includes the WooCommerce extension/feature for Product Bundles. The base library was developed by James Yang and can be found here
- Visit WooCommerce
- Visit WooCommerce REST API DOCS
- Visit WooCommerce Product Bundles REST API DOCS
- Visit WordPress REST API DOCS
If this project has been helpful for you, please consider following me on LinkedIn, Twitter, or Instagram
** For data integration, automation or custom web app development, feel free to (reach out to me)[mailto:luis@mightyintrovert.com]
Usage (WooCommerce REST API)
- How to use JSON.NET in WooCommerce.NET
- Specifiy user agent when making requests to WooCommerce
- How to use webRequestFilter and webResponseFilter in WooCommerce.NET
- Use X HTTP MethodOverride header for DELETE PUT
- Handle different types of Meta Value in WC Restful API V2
<details open> <summary>Click to expand/collapse details...</summary>
using WooCommerceNET.WooCommerce.v3;
using WooCommerceNET.WooCommerce.v3.Extension;
RestAPI rest = new RestAPI("http://www.yourstore.co.nz/wp-json/wc/v3/", "<WooCommerce Key>", "<WooCommerce Secret");
WCObject wc = new WCObject(rest);
//Use below code for WCObject only if you would like to have different CultureInfo
WCObject wc = new WCObject(rest, CultureInfo.GetCultureInfo("de-DE"));
//Get all products
var products = await wc.Product.GetAll();
//Add new product
Product p = new Product()
{
name = "test product 8",
title = "test product 8",
description = "test product 8",
price = 8.0M
};
await wc.Product.Add(p);
//Update products with new values
await wc.Product.Update(128, new Product { name = "test 9" });
//Update products with Null values
await wc.Product.UpdateWithNull(128, new { name = "test 9", weight = "", date_on_sale_from = "", date_on_sale_to = "" });
//Delete product
await wc.Product.Delete(128);
//Use parameters
var p = await wc.Product.GetAll(new Dictionary<string, string>() {
{ "include", "10, 11, 12, 13, 14, 15" },
{ "per_page", "15" } });
//Batch add/update/delete
CustomerBatch cb = new CustomerBatch();
List<Customer> create = new List<Customer>();
create.Add(new Customer()
{
first_name = "first",
last_name = "last",
email = "first@lastsss.com",
username = "firstnlast",
password = "12345"
});
List<Customer> update = new List<Customer>();
update.Add(new Customer()
{
id = 4,
last_name = "xu2"
});
List<int> delete = new List<int>() { 8 };
cb.create = create;
cb.update = update;
cb.delete = delete;
var c = await wc.Customer.UpdateRange(cb);
</details>
Usage (WordPress REST API - JWT/OAuth Authentication)
- How to setup Restful API via JWT Authentication in WordPress
- How to setup Restful API via OAuth 1.0a in WordPress
<details> <summary>Click to expand/collapse details...</summary>
//using JWT
RestAPI rest = new RestAPI("http://www.yourstore.co.nz/wp-json/jwt-auth/v1/token", "<UserName>", "<Password>");
//using OAuth
RestAPI rest = new RestAPI("http://www.yourstore.co.nz/wp-json/wp/v2/", "<Client_Key>", "<Client_Secret>");
rest.oauth_token = "<OAuth_Token>";
rest.oauth_token_secret = "<OAuth_Token_Secret>";
WPObject wp = new WPObject(rest);
//Get all posts
var posts = await wp.Post.GetAll();
//Add a post
var p = new Posts()
{
title = "abc",
content = "<h1>abc</h1>"
};
await wp.Post.Add(p);
//Update post with new values
await wp.Post.Update(123, new { title = "new post" });
//Delete a post
await wp.Post.Delete(123);
//Upload an image
await wp.Media.Add("imagename.jpg", @"C:\path\to\image\file.jpg");
//Create a new user
await wp.Users.Add(new Users()
{
first_name = "test",
last_name = "test",
name = "test",
username = "test123",
email = "test123@gmail.com",
password = "test@12345"
});
</details>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
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 |
---|---|---|
0.9.14 | 261 | 7/11/2023 |
0.9.13 | 178 | 7/11/2023 |
0.9.12 | 175 | 7/9/2023 |
0.9.11 | 175 | 7/9/2023 |
0.9.10 | 180 | 7/8/2023 |
0.9.9 | 184 | 7/8/2023 |
0.9.8 | 173 | 7/8/2023 |
0.9.7 | 176 | 7/8/2023 |
0.9.6 | 170 | 7/8/2023 |
0.9.5 | 168 | 7/8/2023 |
0.9.4 | 167 | 7/7/2023 |
0.9.3 | 175 | 7/6/2023 |
0.9.2 | 194 | 6/30/2023 |
0.9.1 | 183 | 6/30/2023 |
0.9.0 | 167 | 6/29/2023 |
0.8.9 | 173 | 6/28/2023 |
0.8.8 | 185 | 6/23/2023 |
0.8.7 | 177 | 6/23/2023 |
WooCommerce.NET is a .NET library for calling WooCommerce/WordPress REST API in .NET applications. This version is a forked version updated by Luis Vazquez (@luiscreates) to include Product Bundles.
GitHub: https://github.com/luiscreates/WooCommerce.NET
Changes Doc: https://github.com/luiscreates/WooCommerce.NET/blob/master/Changes.md
* v0.8.7 update
1. Added Product Bundles plugin features.