WooCommerce POS Credit Card Fee
A button to manually add a credit card fee
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/wcpos/credit-card-fee/releases/download/v0.0.4/woocommerce-pos-credit-card-fee.zipReadme
WooCommerce POS Credit Card Fee
A WordPress plugin that adds credit card fee management functionality to WooCommerce POS checkout pages.
Features
- Add/remove a 3% credit card fee on order-pay pages
- Session-based security (doesn't require WordPress user authentication)
- Works directly with WooCommerce orders (not cart-based)
- Restricted to POS checkout pages only (
/wcpos-checkout/order-pay/) - Preserves selected payment method across page reloads
- Direct order modification using
WC_Order_Item_Fee
Installation
- Download the plugin
- Upload to your WordPress
/wp-content/plugins/directory - Activate the plugin through the WordPress admin
Usage
The plugin automatically adds fee management buttons to the BACS (Bank Transfer) payment method on POS checkout pages.
- Navigate to a POS order-pay page (
/wcpos-checkout/order-pay/{order-id}/) - Select the Bank Transfer payment method
- Click "Add credit card fee" to add a 3% fee to the order
- Click "Remove credit card fee" to remove the fee
Requirements
- WordPress 5.0+
- WooCommerce 3.0+
- WooCommerce POS
Configuration
The fee percentage is currently set to 3% and defined as a constant in the main plugin file:
define('WCPOS\WooCommercePOS\CreditCardFee\FEE_PERCENTAGE', 3);
Security
The plugin uses a custom session-based security token system instead of WordPress nonces, making it compatible with custom checkout pages where the user context may be modified.
Developer Notes
File Structure
woocommerce-pos-credit-card-fee/
├── assets/
│ └── js/
│ └── fee-manager.js
├── .github/
│ └── workflows/
│ └── release.yml
├── readme.txt
├── README.md
└── woocommerce-pos-credit-card-fee.php
Hooks
The plugin uses several WordPress/WooCommerce hooks:
woocommerce_gateway_description- Adds buttons to payment method descriptionwoocommerce_cart_calculate_fees- Adds fees to cart (for regular checkout)before_woocommerce_pay- Handles fee display on order-pay pageswp_ajax_wcpos_add_credit_card_fee- AJAX handler for adding feeswp_ajax_wcpos_remove_credit_card_fee- AJAX handler for removing fees
License
GPL v2 or later
Support
For support, please visit https://wcpos.com/
Read the full README on GitHub →