Skip to content

iolevel/wpdotnet-woocommerce

Repository files navigation

WooCommerce for .NET

This project builds WooCommerce from the sources on top of .NET. It can be used as a dependency by a regular ASP.NET Core application or self-hosted.

Background

First, we created a project called WpDotNet - WpDotNet is the entire WordPress compiled to a .NET .dll using PeachPie - the PHP to .NET compiler. In addition, it provides a few APIs written purely in C# to add WordPress as middleware to a new or existing ASP.NET Core application.

With WordPress compiled to a .NET assembly, including all the functions and classes compiled along with strongly typed metadata, we wrapped it in a NuGet package. We can then use this as a dependency to build WordPress plugins separately as .NET assemblies, as well.

See PeachPie for more details, and please consider supporting us on Patreon to get access to release builds and nightly builds, a private forum, custom tutorials and blogs and much more 😊

Sample App

See the app folder with a minimal ASP.NET Core application. It references the WpDotNet package and WooCommerce project.

The sample app requires you to start MySql by yourself, port 3306, having database wordpress.

How to use WooCommerce on .NET?

TBD

Structure

  • woocommerce

    Copy of WooCommerce sources

  • woocommerce/woocommerce.msbuildproj

    MSBuild project file that utilizes PeachPie compiler to compile .php source files to a .NET .dll assembly. The project references all of WordPress from a NuGet package (see WpDotNet).

  • global.json

    Versions of PeachPie and WpDotNet used for compilation. Versions need to correspond to each other.

  • app

    Sample ASP.NET Core application. Run dotnet run within the directory to launch WordPress with WooCommerce. Open the app on http://localhost:5004 .

Disclaimer

Work in progress. Based on our discussion on discord/peachpie.io.

Releases

No releases published

Packages

No packages published