Whop Payment Gateway for WooCommerce
Integrate WooCommerce with WHOP payment-service
by Hypestacks Development Team · github.com/orangerdev/woocommerce-whop-integration · website
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/orangerdev/woocommerce-whop-integration/archive/refs/heads/main.zipReadme
WooCommerce Whop Integration
A WordPress plugin that integrates Whop payment gateway with WooCommerce for seamless payment processing and membership management.
Description
This plugin enables WooCommerce stores to accept payments through Whop and automatically manage memberships. It provides full integration with WooCommerce Subscriptions for recurring billing and membership lifecycle management.
Key Features
- Whop Payment Gateway - Accept payments through Whop checkout
- Automatic Membership Sync - Orders and subscriptions automatically create/update Whop memberships
- WooCommerce Subscriptions Integration - Full support for subscription products, renewals, cancellations
- Webhook Handling - Real-time updates from Whop for payments and membership changes
- Retry Queue - Failed syncs automatically retry with exponential backoff using Action Scheduler
- Product Mapping - Map WooCommerce products to Whop products and plans
- HPOS Compatible - Works with WooCommerce High-Performance Order Storage
Requirements
- WordPress 6.0 or higher
- PHP 8.1 or higher
- WooCommerce 8.0 or higher
- WooCommerce Subscriptions 4.0 or higher (optional, for subscription features)
- Whop API credentials (API Key, Company ID)
Installation
- Download the plugin zip file or clone this repository
- Upload to
/wp-content/plugins/woocommerce-whop-integration - Activate the plugin through the 'Plugins' menu in WordPress
- Navigate to WooCommerce > Settings > Payments > Whop to configure
Configuration
API Settings
- Go to WooCommerce > Settings > Payments > Whop
- Enable the payment gateway
- Enter your Whop API Key (from Whop Dashboard > Settings > API)
- Enter your Company ID
- Enter your Webhook Secret (for signature verification)
- Copy the Webhook URL and add it to your Whop Dashboard
Webhook Setup
Configure these webhook events in your Whop Dashboard:
payment.succeeded- Payment completed successfullypayment.failed- Payment failedmembership.activated- Membership became activemembership.deactivated- Membership deactivatedrefund.created- Refund processed
Product Mapping
- Edit any WooCommerce product
- Go to the "Whop" tab in product data
- Enter the Whop Product ID and/or Plan ID
- Enable Auto Sync if desired
Alternatively, set default Product ID and Plan ID in gateway settings.
Usage
For Customers
- Add products to cart
- Proceed to checkout
- Select "Whop" as payment method
- Complete payment on Whop
- Membership is automatically created
For Administrators
Dashboard
Access WooCommerce > Whop Gateway to view:
- Connection status
- Sync queue statistics
- Recent webhook activity
- Quick actions (test connection, sync products)
Sync Queue
View and manage failed sync operations:
- Retry failed syncs manually
- Delete stuck items
- Monitor sync health
Webhooks
View webhook logs and configuration:
- Copy webhook URL for Whop setup
- Monitor incoming webhook events
- Debug webhook issues
Order Sync
Orders paid via Whop are automatically synced. For other payment methods:
- Open the order in WooCommerce
- Find the "Whop Sync" meta box
- Click "Sync to Whop" button
Subscription Sync
Subscriptions are automatically synced when:
- New subscription created
- Status changes (active, on-hold, cancelled, expired)
- Renewal payment processed
Hooks & Filters
Actions
// After order synced to Whop
do_action( 'whop_order_synced', $order_id, $whop_response );
// After membership created/updated
do_action( 'whop_membership_synced', $subscription_id, $membership_id );
// After webhook processed
do_action( 'whop_webhook_processed', $event_type, $payload );
Filters
// Modify payment data before sending to Whop
apply_filters( 'whop_payment_data', $payment_data, $order );
// Modify membership data before sending to Whop
apply_filters( 'whop_membership_data', $membership_data, $subscription );
// Customize access URL on thank you page
apply_filters( 'whop_gateway_access_url', $url, $order );
// Modify webhook payload before processing
apply_filters( 'whop_webhook_payload', $payload, $event_type );
Troubleshooting
Common Issues
Payment Gateway Not Showing
- Ensure WooCommerce is active
- Check that API Key and Company ID are configured
- Verify the gateway is enabled
Sync Failed
- Check WooCommerce > Status > Logs for whop-payment-gateway logs
- Verify API credentials are correct
- Check the sync queue for error messages
Webhooks Not Working
- Verify webhook URL is correctly configured in Whop
- Check webhook secret matches
- Review webhook logs in admin panel
Debug Mode
Enable debug logging in gateway settings to get detailed logs:
- Go to WooCommerce > Settings > Payments > Whop
- Enable "Debug Mode"
- View logs at WooCommerce > Status > Logs
File Structure
woocommerce-whop-integration/
├── whop-payment-gateway.php # Main plugin file
├── includes/
│ ├── class-whop-installer.php # Database tables & activation
│ ├── class-whop-logger.php # WC Logger wrapper
│ ├── class-whop-api-client.php # Whop API communication
│ ├── class-whop-gateway.php # WC Payment Gateway
│ ├── class-whop-webhook-handler.php # Webhook processing
│ ├── class-whop-order-sync.php # Order to Whop sync
│ ├── class-whop-subscription-sync.php # WCS integration
│ ├── class-whop-sync-queue.php # Action Scheduler queue
│ ├── admin/
│ │ ├── class-whop-admin.php # Admin pages
│ │ └── class-whop-admin-notices.php # Admin notices
│ └── frontend/
│ └── class-whop-frontend.php # Frontend features
├── assets/
│ ├── css/
│ │ ├── admin.css # Admin styles
│ │ └── frontend.css # Frontend styles
│ ├── js/
│ │ ├── admin.js # Admin scripts
│ │ └── frontend.js # Frontend scripts
│ └── images/
│ └── whop-logo.svg # Whop logo
├── languages/
│ └── whop-payment-gateway.pot # Translation template
└── docs/
└── TECHNICAL_DOCUMENTATION.md # Technical docs
Changelog
1.0.0
- Initial release
- Whop payment gateway integration
- WooCommerce Subscriptions support
- Webhook handling
- Sync queue with Action Scheduler
- Admin dashboard
- Product mapping
Support
For support, please open an issue on GitHub.
License
This plugin is licensed under the GPL v2 or later.