A WordPress plugin that adds the Caribbean Guilder (XCG) as a currency for WooCommerce. Supports manual conversion rate setting.
- Adds Caribbean Guilder (XCG) as a currency to WooCommerce.
- Allows setting a manual conversion rate via the WordPress admin panel.
- Properly displays the currency symbol
Cg
with a space (Cg 10.00
). - Ensures compatibility with all WooCommerce pages (Product, Cart, Checkout, Invoices).
- Prevents double conversion by only applying conversion if the WooCommerce currency is not set to
XCG
. - PHPUnit tests to verify currency formatting and conversion handling.
-
Download the Plugin
- Clone the repository or download it as a ZIP file.
-
Upload to WordPress
- Upload the folder
xov-xcg-currency-plugin
to your/wp-content/plugins/
directory.
- Upload the folder
-
Activate the Plugin
- Go to WordPress Admin > Plugins and activate XOV XCG Currency.
- Go to Settings > XCG Currency in the WordPress admin panel.
- Set the conversion rate (e.g.,
1.82
for1 USD = Cg 1.82
). - Save changes.
- Go to WooCommerce > Settings > General > Currency Options.
- Set the Currency dropdown to
Caribbean Guilder (XCG)
. - All prices will now be displayed with the
Cg
symbol.
The plugin includes a Docker environment to help you test everything locally. Here's how to get started:
- Build the Environment:
docker-compose build
- Start the Containers:
docker-compose up -d
-
Access WordPress:
- Visit: http://localhost:8080
- Login credentials:
- Username:
admin
- Password:
password
- Username:
-
Access phpMyAdmin (For Database Management):
- Visit: http://localhost:8081
- Server:
db
- Username:
user
- Password:
password
- Stop and Remove Containers & Volumes:
docker-compose down -v
- Rebuild Everything (If Changes Are Made):
docker-compose build
- Start Fresh Containers (With Persistent Data):
docker-compose up -d
The plugin includes PHPUnit tests to ensure everything is working correctly.
- Ensure Docker Containers Are Running:
docker-compose up -d
- Install Composer Dependencies:
docker exec -it <wordpress-container-name> composer install
- Run PHPUnit Tests:
docker exec -it <wordpress-container-name> phpunit --configuration /var/www/html/wp-content/plugins/xov-xcg-currency-plugin/tests/phpunit.xml
- Check Test Results:
The results will be displayed in your terminal. Make sure all tests pass before proceeding.
MIT License. See the LICENSE file for details.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
For support or inquiries, please contact Ten-O-5 B.V. via your preferred communication channels.
If you find this plugin useful, consider making a donation via PayPal.