WooCommerce Checkout Integration

WooCommerce Checkout Integration

WP Sell Services uses WooCommerce as its default checkout platform, providing seamless integration that leverages WooCommerce’s robust payment ecosystem while maintaining service marketplace functionality.

How It Works

When buyers purchase a service:

  1. Service details are stored in WooCommerce cart using a hidden virtual carrier product named “Service Order”
  2. Service data (ID, package, add-ons, vendor) is stored in cart item meta
  3. Buyer completes standard WooCommerce checkout
  4. Plugin creates linked service orders for each vendor
  5. Order statuses sync between WooCommerce and the marketplace

Key Benefits

FeatureBenefit
Payment GatewaysAccess 100+ WooCommerce payment gateways
Mature PlatformLeverage battle-tested WooCommerce infrastructure
Extension EcosystemCompatible with thousands of WooCommerce extensions
Account IntegrationService orders appear in WooCommerce My Account
Admin FamiliarityUse familiar WooCommerce order management

Setup

Prerequisites

  • WordPress 6.0+
  • WooCommerce 7.0+
  • PHP 8.0+

Installation

  1. Install and activate WooCommerce from Plugins → Add New
  2. Complete WooCommerce setup wizard
  3. Go to WP Sell Services → Settings → General
  4. E-Commerce Platform defaults to “Auto-detect” (finds WooCommerce automatically)
  5. Plugin creates the “Service Order” carrier product (published but hidden from shop)

Verify Carrier Product

Go to Products → All Products and look for “Service Order” product. This is a virtual, hidden product that powers service checkout.

Do not delete this product. If accidentally deleted:

  1. Go to WP Sell Services → Settings → General
  2. Save settings to trigger carrier product recreation

Cart Integration

Cart Item Data Structure

When a service is added to cart, these meta keys are stored:

array(
    'wpss_service_id' => 123,        // Service CPT ID
    'wpss_package_id' => 0,          // Package index (0, 1, or 2)
    'wpss_addons'     => [10, 15],   // Array of addon IDs
    'wpss_vendor_id'  => 5,          // Vendor user ID
    'unique_key'      => 'md5_hash', // Prevents duplicate cart items
)

Cart Display

The cart shows:

  • Service title (replaces carrier product name)
  • Package name (Basic, Standard, Premium)
  • Vendor name
  • Add-ons as meta data
  • Dynamic pricing calculated from service data

Multiple Vendors

Buyers can purchase services from multiple vendors in one order. WooCommerce creates a single order, which the plugin splits into separate marketplace orders per vendor.

Order Synchronization

Order Creation Flow

  1. Buyer completes WooCommerce checkout
  2. WooCommerce creates order (WC #1001)
  3. Plugin creates marketplace orders split by vendor:
  4. Order meta stored in both systems

Order Meta

WooCommerce Order:

_wpss_marketplace_order_ids = [234, 235] // Linked WPSS order IDs

Service Order:

_wc_order_id = 1001      // WooCommerce order ID
_payment_method = 'stripe'
_transaction_id = 'ch_abc123'

Status Synchronization

Forward Sync (WooCommerce → Marketplace):

All WooCommerce status changes sync to marketplace orders:

WooCommerceMarketplaceWhen
PendingPending PaymentOrder created, awaiting payment
On HoldOn HoldPayment verification needed
ProcessingIn ProgressPayment received
CompletedCompletedAll services delivered
CancelledCancelledOrder cancelled
RefundedRefundedRefund issued
FailedFailedPayment failed

Reverse Sync (Marketplace → WooCommerce):

Only 2 marketplace statuses sync back to WooCommerce:

MarketplaceWooCommerceWhen
CompletedCompletedService delivered and accepted
CancelledCancelledService cancelled

All other marketplace status changes (Delivered, In Progress, etc.) do not affect the WooCommerce order status.

My Account Integration

Service orders integrate with WooCommerce My Account pages.

For Buyers

  • Orders tab shows WooCommerce orders
  • Service Orders tab shows marketplace order details
  • Messages tab for vendor communication

For Vendors

  • Dashboard for earnings overview
  • Services to manage listings
  • Orders for incoming service orders
  • Earnings for wallet and withdrawals
  • Messages for buyer communication

Order Details

When viewing a service order in My Account, buyers see:

  • Vendor profile link
  • Delivery countdown
  • Message vendor button
  • Requirements form (if needed)
  • Delivery files
  • Accept/Request Revision buttons

Advanced Hooks

Modify Cart Item Data

add_filter( 'wpss_wc_cart_item_data', function( $data, $service_id, $package_id ) {
    $data['custom_meta'] = 'value';
    return $data;
}, 10, 3 );

Change Carrier Product Name

add_filter( 'wpss_wc_carrier_product_name', function( $name ) {
    return 'Custom Service Product';
} );

Redirect to Checkout After Add to Cart

add_filter( 'wpss_wc_add_to_cart_redirect', function( $url ) {
    return wc_get_checkout_url();
} );

Troubleshooting

Service Not Adding to Cart

  1. Verify carrier product exists at Products → All Products
  2. Check browser console for JavaScript errors
  3. Ensure service is published and vendor is active
  4. Clear WooCommerce cart sessions

Orders Not Syncing

  1. Verify order contains service items (check for wpssservice_id meta on line items)
  2. Enable debug logging in wp-config.php:
  3. Check wp-content/debug.log for errors
  4. Manually trigger sync from WooCommerce order edit page

Status Not Updating

  1. Remember only Completed and Cancelled sync from marketplace to WooCommerce
  2. Check WooCommerce → Status → Logs for gateway errors
  3. Verify no plugin conflicts by testing with default theme and minimal plugins

Next Steps

Last updated: February 14, 2026