Buy Again for WooCommerce
WooCommerce Buy Again plugin
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/mariliacamara/buy-again-woo/archive/refs/heads/production.zipAdds a Buy Again feature to WooCommerce, allowing customers to quickly reorder products from previous orders.
Features
-
Adds a Buy Again button to the customer order history.
-
Restores products from a previous order into the cart.
-
Supports simple and variable products.
-
Displays a login welcome modal after authentication.
-
Includes a quick link to the customer's order history.
-
Follows modern PHP development practices:
- Composer
- PSR-4 Autoloading
- PHPStan
- WordPress Coding Standards (WPCS)
- GitHub Actions CI/CD
Requirements
- PHP 8.0+
- WordPress 6.x+
- WooCommerce 8.x+
Installation
Development
Clone the repository:
git clone <repository-url>
cd buy-again-woo
Install dependencies:
composer install
Production
Install the generated release ZIP through the WordPress Plugin Installer.
Development
Coding Standards
Run PHPCS:
composer lint
Automatically fix coding style issues:
composer lint:fix
Static Analysis
Run PHPStan:
composer analyse
Run All Checks
composer check
Architecture
buy-again-woo/
├── assets/
│ ├── css/
│ └── js/
├── includes/
│ ├── BuyAgain.php
│ └── BuyAgainLoginModal.php
├── .github/
│ └── workflows/
├── vendor/
├── composer.json
└── buy-again-woo.php
Release Process
Releases are generated automatically through GitHub Actions.
Create a new release tag:
git tag v1.0.0
git push origin v1.0.0
The workflow will:
- Run PHPCS
- Run PHPStan
- Install production dependencies
- Generate the plugin ZIP package
- Publish a GitHub Release
License
MIT License.