PHPackages                             wptravelengine/addonstarter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wptravelengine/addonstarter

ActiveWp-cli-package[Utility &amp; Helpers](/categories/utility)

wptravelengine/addonstarter
===========================

Composer Package to scaffold WP Travel Engine addon plugins with customizable setup options.

v0.0.2(2mo ago)0141[2 issues](https://github.com/Aayushkalikote/wptravelengine-addon-starter/issues)GPL-3.0-or-laterPHPPHP &gt;=7.4

Since Nov 18Pushed 2mo agoCompare

[ Source](https://github.com/Aayushkalikote/wptravelengine-addon-starter)[ Packagist](https://packagist.org/packages/wptravelengine/addonstarter)[ Docs](https://github.com/Aayushkalikote/wptravelengine-addon-starter)[ RSS](/packages/wptravelengine-addonstarter/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

WP Travel Engine Addon Starter
==============================

[](#wp-travel-engine-addon-starter)

A powerful Composer package to quickly scaffold WP Travel Engine addon plugins with customizable options.

Features
--------

[](#features)

- 🚀 **Quick Scaffolding** - Generate complete addon structure in seconds
- 💳 **Payment Gateway Support** - Pre-configured payment gateway templates
- ⚙️ **Flexible Settings** - Global settings, trip-edit settings, or both
- 📦 **Webpack Ready** - Optional webpack configuration
- 🎯 **Two Installation Modes** - WP-CLI or standalone Composer CLI
- ✨ **Interactive Prompts** - User-friendly guided setup
- 🔧 **Pro Compatible** - Optional WP Travel Engine Pro integration

Requirements
------------

[](#requirements)

- PHP 7.4 or higher (PHP 8.0+ recommended)
- Composer 2.0 or higher
- WP Travel Engine 6.8.0 or higher (for generated addons)

**Note**: While this package supports PHP 7.4+, PHP 8.0 or higher is recommended for better performance and compatibility.

Installation
------------

[](#installation)

### Method 1: WP-CLI Package (Recommended for WordPress Developers)

[](#method-1-wp-cli-package-recommended-for-wordpress-developers)

Install as a WP-CLI package to create addons directly in your WordPress plugins directory:

```
wp package install wptravelengine/addonstarter
```

**If the normal install doesn't work, install from the GitHub repository:**

```
wp package install https://github.com/Aayushkalikote/wptravelengine-addon-starter.git
```

### Method 2: Global Composer Command (Recommended for Package Developers)

[](#method-2-global-composer-command-recommended-for-package-developers)

This package is **not published on Packagist**. Install it globally from the private GitHub repository as a VCS source.

**Step 1 — Register the VCS repository in your global Composer config:**

```
composer global config repositories.wptravelengine-addonstarter vcs https://github.com/Aayushkalikote/wptravelengine-addon-starter.git
```

**Step 2 — Require the package globally:**

```
composer global require wptravelengine/addonstarter:dev-main
```

> Use `dev-main` to track the `main` branch, or pin to a tag like `^0.0.2` once tags are published.

**Step 3 — Add Composer's global bin to your PATH:**

```
export PATH="$HOME/.config/composer/vendor/bin:$PATH"
```

#### Private repository authentication

[](#private-repository-authentication)

If the GitHub repository is private, Composer needs a token to clone it:

```
# Create a GitHub Personal Access Token with `repo` scope at:
# https://github.com/settings/tokens

composer global config --global --auth github-oauth.github.com YOUR_GITHUB_TOKEN
```

Alternatively, use SSH by registering the repo with its SSH URL:

```
composer global config repositories.wptravelengine-addonstarter vcs git@github.com:Aayushkalikote/wptravelengine-addon-starter.git
```

Then ensure your SSH key has access to the repository.

Updating
--------

[](#updating)

**WP-CLI package:**

```
wp package update
```

**Global Composer package (VCS install):**

```
composer global update wptravelengine/addonstarter
```

**Force a specific branch or tag:**

```
# Latest main branch
composer global require wptravelengine/addonstarter:dev-main

# Specific tag
composer global require wptravelengine/addonstarter:^0.0.2
```

**If you get a stale version, clear the cache:**

```
composer clearcache
composer global update wptravelengine/addonstarter
```

Usage
-----

[](#usage)

### Using WP-CLI

[](#using-wp-cli)

Navigate to your WordPress installation and run:

```
cd /path/to/wordpress
wp wptravelengine-addon-starter scaffold
```

The addon will be created in `wp-content/plugins/` directory.

**With flags (non-interactive):**

```
wp wptravelengine-addon-starter scaffold \
  --name="Stripe Payment Gateway" \
  --type=payment-gateway \
  --pro
```

### Using Standalone Composer CLI

[](#using-standalone-composer-cli)

Run from any directory:

```
wptravelengine-addon-starter make:addon
```

The addon will be created in your current directory.

Examples
--------

[](#examples)

### Creating a Payment Gateway

[](#creating-a-payment-gateway)

```
wptravelengine-addon-starter make:addon

# Follow the prompts:
Addon Name: PayStack Payment Gateway
Description: PayStack payment gateway for WP Travel Engine
Is this a payment gateway? yes
Pro Compatible? no
```

**Generated structure:**

```
wptravelengine-paystack-payment/
├── wptravelengine-paystack-payment.php  # Main plugin file
├── composer.json                         # Composer config
├── package.json                          # NPM config
├── phpcs.xml                            # Coding standards
└── includes/
    ├── Plugin.php                       # Main plugin class
    ├── Payment.php                      # Payment gateway class
    └── Builders/
        ├── API.php                      # REST API handler
        └── global-settings.php          # Settings configuration

```

### Creating a Basic Addon

[](#creating-a-basic-addon)

```
wptravelengine-addon-starter make:addon

# Follow the prompts:
Addon Name: Trip Difficulty Level
Description: Add difficulty levels to trips
Is this a payment gateway? no
Pro Compatible? no
Settings type? both
Webpack? yes
```

**Generated structure:**

```
wptravelengine-trip-difficulty-level/
├── wptravelengine-trip-difficulty-level.php
├── composer.json
├── package.json
├── phpcs.xml
├── webpack.config.js
├── includes/
│   ├── Plugin.php
│   ├── Backend/
│   │   └── API.php
│   ├── Settings/
│   │   ├── Globals.php
│   │   └── TripEdits.php
│   └── Builders/
│       ├── global-settings.php
│       └── trip-meta.php
└── src/
    ├── admin/
    └── public/

```

Naming Conventions
------------------

[](#naming-conventions)

The scaffolder automatically handles naming:

InputTypeOutput Directory"PayStack Gateway"Payment`wptravelengine-paystack-payment/`"Stripe Payment"Payment`wptravelengine-stripe-payment/`"Trip Notes"Basic`wptravelengine-trip-notes/`After Scaffolding
-----------------

[](#after-scaffolding)

Once your addon is created:

```
cd wptravelengine-your-addon

# Install PHP dependencies
composer install

# If using webpack
npm install
npm run build
```

### Activate in WordPress

[](#activate-in-wordpress)

```
wp plugin activate wptravelengine-your-addon

# Or via WordPress admin
# Plugins → Installed Plugins → Activate
```

Uninstallation
--------------

[](#uninstallation)

### Remove WP-CLI Package

[](#remove-wp-cli-package)

If installed via WP-CLI, remove it using:

```
wp package uninstall wptravelengine/addonstarter
```

**Verify removal:**

```
wp package list
```

### Remove Global Composer Package

[](#remove-global-composer-package)

If installed globally via Composer, remove it using:

```
composer global remove wptravelengine/addonstarter
```

**Optional — also remove the VCS repository entry from your global Composer config:**

```
composer global config --unset repositories.wptravelengine-addonstarter
```

**Verify removal:**

```
composer global show | grep wptravelengine
```

### Remove Generated Addons

[](#remove-generated-addons)

To remove a generated addon from your WordPress site:

**Using WP-CLI:**

```
# Deactivate first
wp plugin deactivate wptravelengine-your-addon

# Then delete
wp plugin delete wptravelengine-your-addon
```

**Manually:**

```
# Navigate to plugins directory
cd /path/to/wordpress/wp-content/plugins

# Remove the addon directory
rm -rf wptravelengine-your-addon
```

**Via WordPress Admin:**

1. Go to **Plugins → Installed Plugins**
2. Deactivate the addon
3. Click **Delete** once it's deactivated

Options
-------

[](#options)

### Available Flags (Non-Interactive Mode)

[](#available-flags-non-interactive-mode)

FlagDescriptionValues`--name`Addon nameAny string`--description`Addon descriptionAny string`--type`Addon type`payment-gateway`, `basic``--pro`Requires WP Travel Engine ProFlag (no value)`--settings`Settings type (basic addons only)`none`, `global`, `trip-edit`, `both``--webpack`Include webpack setupFlag (no value)### Examples

[](#examples-1)

**Payment gateway with Pro:**

```
wptravelengine-addon-starter make:addon \
  --name="Razorpay Payment" \
  --description="Razorpay gateway for WPE" \
  --type=payment-gateway \
  --pro
```

**Basic addon with global settings:**

```
wptravelengine-addon-starter make:addon \
  --name="Extra Services" \
  --settings=global
```

What Gets Generated
-------------------

[](#what-gets-generated)

### Payment Gateway Addons

[](#payment-gateway-addons)

- Main plugin file with WordPress headers
- Plugin class with singleton pattern
- Payment gateway class extending `WPTravelEngine\PaymentGateways\BaseGateway`
- REST API handler for settings
- Global settings configuration
- Composer and NPM configurations
- PHPCS configuration
- README template

### Basic Addons

[](#basic-addons)

- Main plugin file
- Plugin class
- Conditional settings (global/trip-edit/both)
- REST API handlers (if settings enabled)
- Settings controllers
- Optional webpack configuration
- All configuration files

Troubleshooting
---------------

[](#troubleshooting)

### Command not found after global install

[](#command-not-found-after-global-install)

Add Composer's global bin directory to your PATH:

**Linux/macOS (Bash):**

```
echo 'export PATH="$HOME/.config/composer/vendor/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
```

**Linux/macOS (Zsh):**

```
echo 'export PATH="$HOME/.config/composer/vendor/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
```

**Linux/macOS (Fish):**

```
set -Ux fish_user_paths $HOME/.config/composer/vendor/bin $fish_user_paths
```

### WP-CLI command not registered

[](#wp-cli-command-not-registered)

Ensure the package is installed:

```
wp package list
```

If not listed, reinstall:

```
wp package install wptravelengine/addonstarter
```

### Permission denied

[](#permission-denied)

Make the binary executable:

```
chmod +x ~/.config/composer/vendor/bin/wptravelengine-addon-starter
```

Documentation
-------------

[](#documentation)

- [Getting Started Guide](GETTING-STARTED.md) - Complete setup guide
- [Publishing Guide](PUBLISHING.md) - How to publish your own packages
- [Workflow Guide](WORKFLOW.md) - Distribution workflow
- [Testing Guide](TESTING-LOCAL.md) - Local testing instructions

Changelog
---------

[](#changelog)

### 0.0.3

[](#003)

- New Feature: Added Pro config Composer repository for Pro-compatible addon scaffolds.
- New Feature: Added Pro addon WTE header with placeholder marketplace ID and generated addon name.
- Changed: Generated addon headers now require and test against WP Travel Engine 6.8.0.
- Changed: Removed PHPCS packages from generated addon `composer.json` stubs.
- Changed: Removed `react-hook-form` from generated package dependencies and used the WP Travel Engine webpack external instead.

### 0.0.2 – 28th May 2026

[](#002--28th-may-2026)

- New Feature: Added GitHub release workflow stub generated per addon, with optional Composer authentication step for Pro-compatible addons.
- New Feature: Generated addons now ship with a `languages/` directory and `wp_set_script_translations()` wired into admin script enqueue for JavaScript translations.
- Improved: i18n script in `package.json` no longer excludes the `dist/` directory, so built JavaScript strings are picked up when generating the POT file.
- Improved: `wp i18n make-json` now runs with `--no-purge` to preserve the source `.po` file across regenerations.
- Fixed: Payment gateway global settings now include an `ABSPATH` guard and `@package` docblock by default, ensuring every gateway starts with DEBUG mode and Gateway Label fields.
- Fixed: Removed stray `$webhook_url` variable that appeared above the `return` statement in the payment gateway settings stub.
- Fixed: Resolved PHP warnings about too many arguments passed to `Filesystem::mkdir()` in the webpack source directory setup.

### 0.0.1 – Initial Release

[](#001--initial-release)

- New Feature: Initial release of the WP Travel Engine Addon Starter scaffolding tool.

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

Support
-------

[](#support)

- **Issues**: [GitHub Issues](https://github.com/wptravelengine/wptravelengine-addon-starter/issues)
- **Documentation**: [GitHub Wiki](https://github.com/wptravelengine/wptravelengine-addon-starter/wiki)

License
-------

[](#license)

GPL-3.0-or-later

Author
------

[](#author)

**WP Travel Engine**

- Website: [wptravelengine.com](https://wptravelengine.com)
- Email:

---

**Made with ❤️ by WP Travel Engine Team**

wptravelengine-addon-starter
============================

[](#wptravelengine-addon-starter)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance85

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~190 days

Total

2

Last Release

82d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc938354339ef0aa073a656a7942c9f1889f31b477a21eac47d6ddc5d7e36631?d=identicon)[Aayushkalikote](/maintainers/Aayushkalikote)

---

Top Contributors

[![Aayushkalikote](https://avatars.githubusercontent.com/u/109607702?v=4)](https://github.com/Aayushkalikote "Aayushkalikote (6 commits)")

---

Tags

wordpressgeneratorpayment gatewayscaffolderwp-travel-engine

### Embed Badge

![Health badge](/badges/wptravelengine-addonstarter/health.svg)

```
[![Health](https://phpackages.com/badges/wptravelengine-addonstarter/health.svg)](https://phpackages.com/packages/wptravelengine-addonstarter)
```

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k199.6M3.4k](/packages/composer-composer)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k257.0M28.0k](/packages/friendsofphp-php-cs-fixer)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103574.3k69](/packages/friendsoftypo3-content-blocks)[api-platform/openapi

Models to build and serialize an OpenAPI specification.

425.3M110](/packages/api-platform-openapi)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.9k1](/packages/phpactor-phpactor)[eliashaeussler/typo3-solver

Solver - Extends TYPO3's exception handling with AI generated solutions. Problems can also be solved from command line. Several OpenAI parameters are configurable and prompts and solution providers can be customized as desired.

302.1k](/packages/eliashaeussler-typo3-solver)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
