Skip to content
rayaxis-techPublic

About

Wholesale & B2B for WooCommerce – free edition. Trade accounts, wholesale prices, minimum order quantities and bulk order blocks.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Ekmusta – Wholesale & B2B for WooCommerce

CI WordPress.org License: GPL v3

This is the source of the free edition of Ekmusta, the plugin published on WordPress.org.

Ekmusta adds wholesale selling to a normal WooCommerce store:

  • trade account applications, with manual or automatic approval;
  • one wholesale price level (percentage off, or a fixed price per product);
  • minimum order quantities;
  • a bulk order grid block and an application form block.

It is built on blocks and the WordPress Interactivity API.

Ekmusta Pro (more price tiers, quick order by SKU, reorder, CSV import and export, and more) is a separate product and is not in this repository.

Requirements

  • WordPress 6.8+
  • WooCommerce 9.0+
  • PHP 8.1+
  • Node.js 20+ (only to rebuild the JavaScript)

Use it from source

git clone https://github.com/rayaxis-tech/ekmusta.git wp-content/plugins/ekmusta

The compiled files in build/ are committed, so the plugin works straight after cloning. Activate it under Plugins, then open WooCommerce → Ekmusta.

Develop

npm ci
npm run start   # rebuild blocks on change
npm run build   # production build of blocks, admin and editor scripts
npm run lint:js

Commit the build/ changes together with the src/ changes that made them.

Folder layout

Path What it is
ekmusta.php Plugin bootstrap, headers and constants
includes/ PHP classes (namespace Ekmusta\)
includes/Api/ REST endpoints (/wp-json/ekmusta/v1)
src/ JavaScript and SCSS source for blocks, admin and editor
build/ Compiled output of src/
templates/ Front-end templates you can override from a theme
languages/ Translation template (ekmusta.pot)
vendor/freemius/ Freemius SDK (third party, do not edit)

Extend Ekmusta

Ekmusta has actions, filters, REST routes and theme template overrides. See docs/developers.md for the full list with examples.

A quick taste: give one customer group a lower minimum order quantity.

add_filter( 'ekmusta_min_order_qty', function ( int $qty, int $product_id ): int {
	return current_user_can( 'vip_buyer' ) ? 1 : $qty;
}, 10, 2 );

Contribute

Bug reports, fixes and translations are welcome. Read CONTRIBUTING.md first.

Found a security problem? Do not open a public issue. See SECURITY.md.

Licence

GPL-3.0-or-later. See LICENSE. Made by Rayaxis Technologies.

About

Wholesale & B2B for WooCommerce – free edition. Trade accounts, wholesale prices, minimum order quantities and bulk order blocks.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages