WP Manifestindependent plugin directory
manifest / ecommerce / woocommerce-whop-integration

Whop Payment Gateway for WooCommerce

Integrate WooCommerce with WHOP payment-service

by Hypestacks Development Team · github.com/orangerdev/woocommerce-whop-integration · website

0stars
0forks

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.zip

Readme

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

  1. Download the plugin zip file or clone this repository
  2. Upload to /wp-content/plugins/woocommerce-whop-integration
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Navigate to WooCommerce > Settings > Payments > Whop to configure

Configuration

API Settings

  1. Go to WooCommerce > Settings > Payments > Whop
  2. Enable the payment gateway
  3. Enter your Whop API Key (from Whop Dashboard > Settings > API)
  4. Enter your Company ID
  5. Enter your Webhook Secret (for signature verification)
  6. 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 successfully
  • payment.failed - Payment failed
  • membership.activated - Membership became active
  • membership.deactivated - Membership deactivated
  • refund.created - Refund processed

Product Mapping

  1. Edit any WooCommerce product
  2. Go to the "Whop" tab in product data
  3. Enter the Whop Product ID and/or Plan ID
  4. Enable Auto Sync if desired

Alternatively, set default Product ID and Plan ID in gateway settings.

Usage

For Customers

  1. Add products to cart
  2. Proceed to checkout
  3. Select "Whop" as payment method
  4. Complete payment on Whop
  5. 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:

  1. Open the order in WooCommerce
  2. Find the "Whop Sync" meta box
  3. 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:

  1. Go to WooCommerce > Settings > Payments > Whop
  2. Enable "Debug Mode"
  3. 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.

Read the full README on GitHub →