@@ -5,36 +5,40 @@ Official WordPress plugin for accepting payments through MONEI's payment gateway
55## Description
66
77MONEI is an e-commerce payment gateway for WooCommerce that enables merchants to accept:
8- - Credit/Debit Cards (230+ currencies)
9- - Apple Pay & Google Pay
10- - Bizum (Spain)
11- - PayPal
12- - SEPA Direct Debit (EU)
13- - Multibanco & MBWay (Portugal)
8+
9+ - Credit/Debit Cards (230+ currencies)
10+ - Apple Pay & Google Pay
11+ - Bizum (Spain)
12+ - PayPal
13+ - SEPA Direct Debit (EU)
14+ - Multibanco & MBWay (Portugal)
1415
1516## Development Setup
1617
1718### Prerequisites
1819
19- - PHP 7.4 or higher
20- - Node.js 18 or higher
21- - Composer
22- - Yarn 4 (managed via Corepack)
20+ - PHP 8.0 or higher
21+ - Node.js 18 or higher
22+ - Composer
23+ - Yarn 4 (managed via Corepack)
2324
2425### Installation
2526
26271 . Clone the repository:
28+
2729``` bash
2830git clone git@github.com:MONEI/MONEI-WooCommerce.git
2931cd MONEI-WooCommerce
3032```
3133
32342 . Install PHP dependencies:
35+
3336``` bash
3437composer install
3538```
3639
37403 . Install Node dependencies and build assets:
41+
3842``` bash
3943yarn install
4044yarn build
@@ -54,18 +58,20 @@ This project uses **conventional commits** to enable automated changelog generat
5458```
5559
5660** Types:**
57- - ` feat: ` - New feature
58- - ` fix: ` - Bug fix
59- - ` docs: ` - Documentation changes
60- - ` style: ` - Code style changes (formatting, etc.)
61- - ` refactor: ` - Code refactoring
62- - ` perf: ` - Performance improvements
63- - ` test: ` - Adding or updating tests
64- - ` build: ` - Build system changes
65- - ` ci: ` - CI/CD changes
66- - ` chore: ` - Other changes (dependencies, etc.)
61+
62+ - ` feat: ` - New feature
63+ - ` fix: ` - Bug fix
64+ - ` docs: ` - Documentation changes
65+ - ` style: ` - Code style changes (formatting, etc.)
66+ - ` refactor: ` - Code refactoring
67+ - ` perf: ` - Performance improvements
68+ - ` test: ` - Adding or updating tests
69+ - ` build: ` - Build system changes
70+ - ` ci: ` - CI/CD changes
71+ - ` chore: ` - Other changes (dependencies, etc.)
6772
6873** Examples:**
74+
6975``` bash
7076git commit -m " feat: add support for new payment method"
7177git commit -m " fix: resolve checkout error on mobile devices"
@@ -89,48 +95,54 @@ yarn build
8995### Automated Release with Conventional Commits
9096
91971 . ** Ensure all changes are committed** with proper conventional commit messages:
98+
9299``` bash
93100git add .
94101git commit -m " feat: add new payment gateway"
95102git push
96103```
97104
981052 . ** Run the release command** :
106+
99107``` bash
100108yarn release
101109```
102110
103111This will automatically:
104- - ✅ Bump version in ` package.json ` , ` readme.txt ` , ` .readme-template ` , ` woocommerce-gateway-monei.php ` , and ` class-woocommerce-gateway-monei.php `
105- - ✅ Generate changelog from git conventional commits
106- - ✅ Update ` readme.txt ` with new changelog entries above manual entries
107- - ✅ Generate ` CHANGELOG.md ` with full git history
108- - ✅ Create git tag (e.g., ` 6.3.9 ` )
109- - ✅ Generate GitHub release notes
110- - ✅ Push changes and tags to GitHub
112+
113+ - ✅ Bump version in ` package.json ` , ` readme.txt ` , ` .readme-template ` , ` woocommerce-gateway-monei.php ` , and ` class-woocommerce-gateway-monei.php `
114+ - ✅ Generate changelog from git conventional commits
115+ - ✅ Update ` readme.txt ` with new changelog entries above manual entries
116+ - ✅ Generate ` CHANGELOG.md ` with full git history
117+ - ✅ Create git tag (e.g., ` 6.3.9 ` )
118+ - ✅ Generate GitHub release notes
119+ - ✅ Push changes and tags to GitHub
111120
112121** Changelog System:**
113- - New releases with conventional commits → auto-generated entries at the top
114- - Historical releases → manual entries preserved below
115- - ` .readme-template ` contains ` {{__PLUGIN_CHANGELOG__}} ` placeholder
116- - ` generate-wp-readme ` replaces placeholder with git commit history
117- - Manual changelog entries remain intact below the auto-generated section
122+
123+ - New releases with conventional commits → auto-generated entries at the top
124+ - Historical releases → manual entries preserved below
125+ - ` .readme-template ` contains ` {{__PLUGIN_CHANGELOG__}} ` placeholder
126+ - ` generate-wp-readme ` replaces placeholder with git commit history
127+ - Manual changelog entries remain intact below the auto-generated section
118128
1191293 . ** CI/CD takes over** :
120- - GitHub Actions builds the plugin
121- - Deploys to WordPress.org
122- - Attaches plugin ZIP to GitHub release
130+ - GitHub Actions builds the plugin
131+ - Deploys to WordPress.org
132+ - Attaches plugin ZIP to GitHub release
123133
124134### Dry Run (Testing)
125135
126136Test the release process without making changes:
137+
127138``` bash
128139yarn release --dry-run
129140```
130141
131142### Manual Version Bump
132143
133144To specify a version manually:
145+
134146``` bash
135147yarn release --increment patch # 6.3.8 → 6.3.9
136148yarn release --increment minor # 6.3.8 → 6.4.0
@@ -164,25 +176,28 @@ yarn release 6.4.0 # Specific version
164176
165177The project uses automated linting and code quality tools to maintain consistent code style and catch bugs early:
166178
167- - ** JavaScript/CSS** : ESLint + Stylelint (via ` @wordpress/scripts ` )
168- - ** PHP** : PHPCS (WordPress Coding Standards) + PHPStan (static analysis)
169- - ** Git Hooks** : Husky + lint-staged for automatic fixing
170- - ** Commit Messages** : Commitlint (conventional commits)
179+ - ** JavaScript/CSS** : ESLint + Stylelint (via ` @wordpress/scripts ` )
180+ - ** PHP** : PHPCS (WordPress Coding Standards) + PHPStan (static analysis)
181+ - ** Git Hooks** : Husky + lint-staged for automatic fixing
182+ - ** Commit Messages** : Commitlint (conventional commits)
171183
172184### Git Hooks
173185
174186** Pre-commit Hook** :
175- - Auto-fixes staged files with ` lint-staged `
176- - PHP: ` phpcbf ` (auto-fix code style) + ` phpstan ` (static analysis)
177- - JavaScript: ` eslint --fix `
178- - CSS: ` stylelint --fix `
179- - ** Prevents committing broken code** by running PHPStan
187+
188+ - Auto-fixes staged files with ` lint-staged `
189+ - PHP: ` phpcbf ` (auto-fix code style) + ` phpstan ` (static analysis)
190+ - JavaScript: ` eslint --fix `
191+ - CSS: ` stylelint --fix `
192+ - ** Prevents committing broken code** by running PHPStan
180193
181194** Commit-msg Hook** :
182- - Validates commit message format (conventional commits)
195+
196+ - Validates commit message format (conventional commits)
183197
184198** Pre-push Hook** :
185- - ** Branch Protection** : Blocks direct pushes to ` master ` /` main ` branches
199+
200+ - ** Branch Protection** : Blocks direct pushes to ` master ` /` main ` branches
186201
187202### Linting Commands
188203
@@ -213,13 +228,13 @@ yarn lint:php:phpstan # Check PHP static analysis only
213228
214229### Configuration Files
215230
216- - ` .lintstagedrc.json ` - Auto-fix configuration for staged files
217- - ` .eslintrc.js ` - JavaScript linting rules
218- - ` .eslintignore ` - Exclude ` public/ ` build outputs from JS linting
219- - ` .stylelintignore ` - Exclude ` public/ ` build outputs from CSS linting
220- - ` phpcs.xml ` - PHP code style rules (WordPress standards)
221- - ` phpstan.neon ` - PHP static analysis configuration (Level 4)
222- - ` commitlint.config.js ` - Commit message validation rules
231+ - ` .lintstagedrc.json ` - Auto-fix configuration for staged files
232+ - ` .eslintrc.js ` - JavaScript linting rules
233+ - ` .eslintignore ` - Exclude ` public/ ` build outputs from JS linting
234+ - ` .stylelintignore ` - Exclude ` public/ ` build outputs from CSS linting
235+ - ` phpcs.xml ` - PHP code style rules (WordPress standards)
236+ - ` phpstan.neon ` - PHP static analysis configuration (Level 4)
237+ - ` commitlint.config.js ` - Commit message validation rules
223238
224239### PHPStan (Static Analysis)
225240
@@ -234,14 +249,16 @@ yarn lint:php:phpstan
234249```
235250
236251** Common PHPStan errors:**
237- - Missing type hints in docblocks
238- - Calling undefined methods
239- - Type mismatches in function parameters
240- - Unreachable code
252+
253+ - Missing type hints in docblocks
254+ - Calling undefined methods
255+ - Type mismatches in function parameters
256+ - Unreachable code
241257
242258** Configuration** : ` phpstan.neon ` (Level 4)
243- - WordPress/WooCommerce function stubs included
244- - Bootstrap file for plugin constants
259+
260+ - WordPress/WooCommerce function stubs included
261+ - Bootstrap file for plugin constants
245262
246263### PHPCS (Code Style)
247264
@@ -258,9 +275,10 @@ yarn lint:php:fix
258275```
259276
260277** Configuration** : ` phpcs.xml `
261- - WordPress-Core ruleset
262- - Tabs for indentation
263- - PSR-4 autoloading compatible
278+
279+ - WordPress-Core ruleset
280+ - Tabs for indentation
281+ - PSR-4 autoloading compatible
264282
265283### Branch Protection
266284
@@ -279,38 +297,39 @@ git push origin feat/my-feature
279297
280298## Scripts
281299
282- - ` yarn build ` - Build production assets
283- - ` yarn start ` - Development build with watch mode
284- - ` yarn release ` - Create new release (automated versioning)
285- - ` yarn lint ` - Lint all files (JS + CSS + PHP)
286- - ` yarn lint:fix ` - Auto-fix all linting issues
287- - ` yarn lint:js ` - Lint JavaScript
288- - ` yarn lint:js-fix ` - Fix JavaScript linting issues
289- - ` yarn lint:css ` - Lint CSS
290- - ` yarn lint:css-fix ` - Fix CSS linting issues
291- - ` yarn lint:php ` - Lint PHP (PHPCS + PHPStan)
292- - ` yarn lint:php:fix ` - Fix PHP code style issues
300+ - ` yarn build ` - Build production assets
301+ - ` yarn start ` - Development build with watch mode
302+ - ` yarn release ` - Create new release (automated versioning)
303+ - ` yarn lint ` - Lint all files (JS + CSS + PHP)
304+ - ` yarn lint:fix ` - Auto-fix all linting issues
305+ - ` yarn lint:js ` - Lint JavaScript
306+ - ` yarn lint:js-fix ` - Fix JavaScript linting issues
307+ - ` yarn lint:css ` - Lint CSS
308+ - ` yarn lint:css-fix ` - Fix CSS linting issues
309+ - ` yarn lint:php ` - Lint PHP (PHPCS + PHPStan)
310+ - ` yarn lint:php:fix ` - Fix PHP code style issues
293311
294312## Tech Stack
295313
296- - ** Build Tool** : Webpack (via @wordpress/scripts )
297- - ** Package Manager** : Yarn 4 (Berry)
298- - ** Commit Linting** : Commitlint + Husky
299- - ** Release Automation** : release-it + generate-wp-readme
300- - ** Changelog** : Auto-generated from conventional commits
314+ - ** Build Tool** : Webpack (via @wordpress/scripts )
315+ - ** Package Manager** : Yarn 4 (Berry)
316+ - ** Commit Linting** : Commitlint + Husky
317+ - ** Release Automation** : release-it + generate-wp-readme
318+ - ** Changelog** : Auto-generated from conventional commits
301319
302320## CI/CD
303321
304322### GitHub Actions Workflows
305323
3063241 . ** WordPress.org Deployment** (` .github/workflows/main.yml ` )
307- - Triggers on GitHub release creation
308- - Builds assets, deploys to WordPress.org
309- - Attaches ZIP to GitHub release
325+
326+ - Triggers on GitHub release creation
327+ - Builds assets, deploys to WordPress.org
328+ - Attaches ZIP to GitHub release
310329
3113302 . ** Manual Package Creation** (` .github/workflows/create-package.yml ` )
312- - Manually triggered via Actions UI
313- - Creates installable plugin ZIP
331+ - Manually triggered via Actions UI
332+ - Creates installable plugin ZIP
314333
315334## Contributing
316335
@@ -321,9 +340,9 @@ git push origin feat/my-feature
321340
322341## Support
323342
324- - Documentation: https://support.monei.com
325- - Email: support@monei.com
326- - WordPress.org: https://wordpress.org/plugins/monei/
343+ - Documentation: https://support.monei.com
344+ - Email: support@monei.com
345+ - WordPress.org: https://wordpress.org/plugins/monei/
327346
328347## License
329348
0 commit comments