All Projects → XiaoFaye → Woocommerce.net

XiaoFaye / Woocommerce.net

Licence: mit
A .NET Wrapper for WooCommerce/WordPress REST API

Projects that are alternatives of or similar to Woocommerce.net

Intervention
WordPress plugin to configure wp-admin and application state using a single config file.
Stars: ✭ 481 (+94.74%)
Mutual labels:  wordpress-api, woocommerce, wordpress-plugin
Osen Wc Mpesa
WordPress Plugin that extends WordPress and WooCommerce functionality to integrate MPESA for making payments, remittances, checking account balance transaction status and reversals.
Stars: ✭ 45 (-81.78%)
Mutual labels:  woocommerce, wordpress-plugin
Ultimate Fields
The plugin for custom fields in WordPress
Stars: ✭ 39 (-84.21%)
Mutual labels:  wordpress-api, wordpress-plugin
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+4205.26%)
Mutual labels:  api-client, restful-api
Vsphere Automation Sdk Python
Python samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
Stars: ✭ 451 (+82.59%)
Mutual labels:  api-client, restful-api
Datafire
A framework for building integrations and APIs
Stars: ✭ 487 (+97.17%)
Mutual labels:  api-client, restful-api
Better Rest Endpoints
A WordPress plugin that serves up slimmer WP Rest API endpoints.
Stars: ✭ 56 (-77.33%)
Mutual labels:  wordpress-api, wordpress-plugin
atum-stock-manager-for-woocommerce
The ultimate stock management plugin for serious WooCommerce Sellers.
Stars: ✭ 16 (-93.52%)
Mutual labels:  wordpress-plugin, woocommerce
Woocommerce Coupon Links
A WordPress plugin to automatically apply WooCommerce coupon codes to the cart via a URL.
Stars: ✭ 127 (-48.58%)
Mutual labels:  woocommerce, wordpress-plugin
Vsphere Automation Sdk Java
Java samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
Stars: ✭ 132 (-46.56%)
Mutual labels:  api-client, restful-api
Live Composer Page Builder
Free page builder plugin for WordPress http://livecomposerplugin.com
Stars: ✭ 143 (-42.11%)
Mutual labels:  wordpress-api, wordpress-plugin
Woocommerce Custom Orders Table
Store WooCommerce order data in a custom table for improved performance.
Stars: ✭ 415 (+68.02%)
Mutual labels:  woocommerce, wordpress-plugin
Wp Graphql Woocommerce
Add WooCommerce support and functionality to your WPGraphQL server
Stars: ✭ 318 (+28.74%)
Mutual labels:  woocommerce, wordpress-plugin
Awesome Woocommerce
Plugins and code snippets to improve your WooCommerce store.
Stars: ✭ 279 (+12.96%)
Mutual labels:  woocommerce, wordpress-plugin
Vsphere Automation Sdk Rest
REST (Postman and JavaScript) samples and API reference documentation for vSphere using the VMware REST API
Stars: ✭ 182 (-26.32%)
Mutual labels:  api-client, restful-api
Performance Improvements For Woocommerce
Performance tweaks for the front-end and back-end of a store.
Stars: ✭ 46 (-81.38%)
Mutual labels:  woocommerce, wordpress-plugin
WooCommerce-Plugin-Extension-Boilerplate
Plugin boilerplate to create extensions of WooCommerce
Stars: ✭ 16 (-93.52%)
Mutual labels:  wordpress-plugin, woocommerce
woo-custom-emails
An add-on to support woocommerce custom emails
Stars: ✭ 15 (-93.93%)
Mutual labels:  wordpress-plugin, woocommerce
Restsplain
WordPress REST API documentation generator
Stars: ✭ 126 (-48.99%)
Mutual labels:  wordpress-api, wordpress-plugin
Woo Poly Integration
Looking for maintainers! - Wordpress WooCommerce Polylang Integration
Stars: ✭ 168 (-31.98%)
Mutual labels:  woocommerce, wordpress-plugin

WooCommerce.NET

A Brief Intro

WooCommerce.NET is a .NET library for calling WooCommerce/WordPress REST API with OAuth/JWT in .NET applications.

NuGet

If this project has been helpful for you and you want to support it, please consider Buying me a coffee☕️

Usage (WooCommerce REST API)

Click to expand/collapse details...
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);

//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 = "[email protected]",
    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);

Usage (WordPress REST API - JWT/OAuth Authentication)

Click to expand/collapse details...
//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 = "[email protected]",
    password = "[email protected]"
});

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].