Plugin Settings
The settings on this page are the WordPress plugin settings — what you configure in Settings → Swft Checkout in your WP admin. They cover the integration between your WordPress site and the Swft API.
Enable Swft Checkout
Section titled “Enable Swft Checkout”Option: swft_enabled (string: 'yes' | 'no')
Master toggle. When set to yes and an API key is present, Swft intercepts the WooCommerce checkout page. Set to no to disable without uninstalling — native WooCommerce checkout is used as the fallback.
API Key
Section titled “API Key”Option: swft_api_key (string)
Your Swft API key. Obtained from your Swft Dashboard. The plugin will not create sessions without a valid API key.
Debug Logging
Section titled “Debug Logging”Option: swft_debug (string: 'yes' | 'no')
When enabled, every decision in the checkout redirect flow is logged to swft_debug_log (stored as a WordPress option). The last 200 entries are kept. Viewable in the admin panel under the Dashboard tab.
Logged events include: template_redirect firing, is_checkout() result, plugin enabled status, cart contents count, session transient hits and misses, and the full redirect URL.
Disable in production — each checkout page visit writes to the database when debug is on.
WooCommerce REST API Credentials
Section titled “WooCommerce REST API Credentials”Options: swft_wc_consumer_key, swft_wc_consumer_secret
WooCommerce REST API key and secret with Read/Write permissions. Required for order sync back to WooCommerce after payment.
Generate in WooCommerce → Settings → Advanced → REST API. After saving, Swft syncs these credentials to the API immediately.
Stripe Connection
Section titled “Stripe Connection”Option: swft_stripe_connected (bool)
Read-only display of Stripe Connect status. Use the Connect with Stripe or Disconnect buttons to change this. See Connecting Stripe.
Custom Domain
Section titled “Custom Domain”Option: swft_custom_domain (string)
A custom domain for your checkout, e.g. checkout.yourstore.com. Requires DNS configuration. See Custom Domains.
Google Maps API Key
Section titled “Google Maps API Key”Option: swft_google_maps_key (string)
Enables address autocomplete (Google Places) on the details form and the interactive map on the confirmation screen.
Checkout Template
Section titled “Checkout Template”Option: swft_checkout_template (string: 'minimal' | 'split' | 'express')
Layout template for the checkout page. Default: minimal. See Templates.
Store Policies
Section titled “Store Policies”Options: swft_policy_returns, swft_policy_shipping, swft_policy_privacy
URLs to your store’s returns, shipping, and privacy policy pages. When set, links appear in the policies bar at the bottom of the checkout.
Fallback to WC checkout on failure
Section titled “Fallback to WC checkout on failure”Option: swft_fallback_enabled (string: 'yes' | 'no')
When set to yes, if the Swft API is unreachable (network failure, API outage, invalid API key), the shopper falls through to the standard WooCommerce checkout page instead of seeing a blank page or error. Strongly recommended in production.
Server-side tracking pixels
Section titled “Server-side tracking pixels”Meta Pixel (CAPI)
Section titled “Meta Pixel (CAPI)”Options: swft_meta_pixel_id, swft_meta_capi_token
Meta (Facebook) Conversions API. When set, AddPaymentInfo and Purchase events fire server-side on payment intent creation and on payment success respectively.
Options: swft_ga4_measurement_id, swft_ga4_api_secret
Google Analytics 4 Measurement Protocol. Same events fired as Meta above.
TikTok
Section titled “TikTok”Options: swft_tiktok_pixel_id, swft_tiktok_access_token
TikTok Events API. Same events fired.
All tracking events are fire-and-forget — they never block the response to the customer.
Repeat customer recognition
Section titled “Repeat customer recognition”Option: swft_repeat_customer_window_days (int, default 30)
When a returning shopper visits checkout within this window, Swft pre-fills their details from the previous session’s data (matched on email). Set to 0 to disable.
Address validation provider
Section titled “Address validation provider”Option: swft_address_provider (string: 'google' | 'smartystreets' | 'none')
Pick the address autocomplete provider:
google— uses Google Places. Best global coverage. Requiresswft_google_maps_key.smartystreets— uses SmartyStreets. Better for US-only stores. Requires a SmartyStreets API key.none— disables autocomplete; shoppers type addresses manually.
Tax automation
Section titled “Tax automation”Option: swft_tax_provider (string: 'wc' | 'avalara' | 'taxjar')
How tax is calculated:
wc— use WooCommerce’s built-in tax rules (default).avalara— call Avalara AvaTax for real-time tax. Requires Avalara API credentials.taxjar— call TaxJar. Requires TaxJar API key.
When using avalara or taxjar, WooCommerce’s local tax rules are ignored entirely. Test thoroughly before relying.
Custom fields
Section titled “Custom fields”Custom fields you’ve defined in your Swft Dashboard appear automatically — there’s no WP-side option for them. See Dashboard → Settings → Custom Fields.
Reading options in PHP
Section titled “Reading options in PHP”All options are standard WordPress options:
$enabled = get_option( 'swft_enabled' ) === 'yes';$api_key = get_option( 'swft_api_key', '' );$template = get_option( 'swft_checkout_template', 'minimal' );Avoid hard-coding sensitive values — store API keys in env vars or a secrets manager and get_option only the toggle flags.
What’s NOT here
Section titled “What’s NOT here”Settings that live in your Swft Dashboard (not in WordPress):
- Brand colour, logo, fonts → see Checkout Editor
- Webhook URL and secret → see Webhooks Reference
- Recovery email content → see Dashboard → Settings → Recovery emails
- Fraud thresholds → see Fraud Rules
- Dunning retry schedule → see Dunning
- KYC configuration → see KYC
- Payment gateway credentials (Stripe, PayPal, Klyme, NomuPay) → see Payment Gateways
- Subscription plans, Offload tier, custom field definitions, A/B tests → all in Dashboard