Skip to content

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.

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.

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.

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.

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.

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.

Option: swft_custom_domain (string)

A custom domain for your checkout, e.g. checkout.yourstore.com. Requires DNS configuration. See Custom Domains.

Option: swft_google_maps_key (string)

Enables address autocomplete (Google Places) on the details form and the interactive map on the confirmation screen.

Option: swft_checkout_template (string: 'minimal' | 'split' | 'express')

Layout template for the checkout page. Default: minimal. See Templates.

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.

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.

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.

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.

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.

Option: swft_address_provider (string: 'google' | 'smartystreets' | 'none')

Pick the address autocomplete provider:

  • google — uses Google Places. Best global coverage. Requires swft_google_maps_key.
  • smartystreets — uses SmartyStreets. Better for US-only stores. Requires a SmartyStreets API key.
  • none — disables autocomplete; shoppers type addresses manually.

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 you’ve defined in your Swft Dashboard appear automatically — there’s no WP-side option for them. See Dashboard → Settings → Custom Fields.

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.

Settings that live in your Swft Dashboard (not in WordPress):