Overview
The Novac WooCommerce plugin is the official payment gateway integration for WooCommerce stores. It enables you to accept payments directly at checkout using Novac’s secure hosted checkout experience, with full support for cards, bank transfers, and mobile money.Prerequisites
See details
See details
Before you begin, ensure the following tools are installed on your machine:
- Node.js v20 or higher, required to run the build scripts
- pnpm the package manager used for all JavaScript dependencies
- WP-CLI used to interact with WordPress from the command line
- Webpack bundled via
wp-scriptsto compile and optimize plugin assets
Account Setup
Before accepting payments, you need to connect your Novac account to the plugin:- Navigate to the Novac Payments settings page in your WordPress admin.
- Enter your API key from the Novac Dashboard.
- Configure your Checkout preferences to match your store’s requirements.
Build Process
The plugin uses Webpack and UglifyJS as its core build tools to produce minified, production-ready JavaScript and CSS. This section is intended for developers who need to modify, debug, or reproduce the plugin build from source.Build Scripts
The following scripts define the full build pipeline. They are run in sequence to install dependencies, minify JavaScript, generate translation files, bundle assets, and produce the final plugin zip:| Script | Description |
|---|---|
prebuild | Installs all JavaScript and PHP dependencies before the build starts |
build | Runs the full production build pipeline end to end |
build:webpack | Compiles and bundles assets using wp-scripts |
start | Starts the development server with file watching enabled |
start:webpack | Clears the build directory and starts wp-scripts in watch mode |
preuglify | Removes any previously minified JavaScript files before minification runs |
uglify | Minifies all JavaScript source files using UglifyJS with compression and mangling |
Reproducing the Build
Follow these steps to clone the repository and produce a fresh plugin zip from source:Run the Setup Script
The setup script configures the local environment, including any server-side dependencies needed for the build:
Run the Build
Execute the full production build. This minifies JavaScript, compiles assets via Webpack, generates translation files, and packages everything into a plugin zip:
Download the Plugin Zip
If you prefer not to build from source, you can download the latest prebuilt plugin zip directly from the GitHub Releases page.
Unminified Source Files
For debugging or auditing purposes, the following unminified source files are available in the repository. These are the raw files that get processed during the build:| File | Description |
|---|---|
assets/js/checkout.js | Handles the frontend checkout flow |
assets/blocks/index.js | Powers the WooCommerce blocks integration |
assets/admin/settings/index.js | Admin settings page interface |
assets/editor/index.js | Block editor (Gutenberg) integration |