Settings storage

Updated

WooCommerce stores the gateway settings in the option woocommerce_wpinterface_paddle_settings (Settings::OPTION). The free plugin uses the same option and keys, so moving between Lite and Pro keeps every credential. Read values with Settings::get( $key, $default ), which caches the option for the request; Settings::flush() clears that cache.

KeyMeaning
enabledyes / no (default no)
title, descriptionShown at checkout
api_modebilling (default) or classic
testmodeyes (default) = sandbox
billing_{live,sandbox}_api_keyBilling API key
billing_{live,sandbox}_client_tokenClient-side token; must start with live_ / test_ to count as configured
billing_{live,sandbox}_webhook_secretNotification destination secret (filled by Set up webhook)
classic_{live,sandbox}_vendor_id, …_api_key, …_public_keyClassic credentials
checkout_modeinline (default) or overlay
checkout_themelight (default) or dark
checkout_locale'' (automatic) or a Paddle locale code
show_iconsyes (default): payment marks next to the option
product_nameClassic: single-line title for multi-item orders
product_imageFallback HTTPS image for the checkout
tax_categoryBilling product tax_category (default standard)
tax_modeBilling price tax_mode: account_setting (default), external, internal
cancel_timingBilling: next_billing_period (default) or immediately
disable_customer_portalyes hides “Update payment method” on customer subscriptions
hide_invoice_linkyes hides Paddle invoice/receipt links
debugyes logs routine API calls and webhooks
remove_data_on_uninstallyes lets uninstall.php delete the plugin’s options

status, webhook, account, checkout, subscriptions_title and advanced are display-only rows or headings.

Helpers

Use Settings::credential( $name, $sandbox = null, $mode = null ) and never read credential keys directly. Other helpers: enabled(), sandbox(), api_mode(), is_billing(), is_configured( $sandbox = null ), client_token_valid(), checkout_mode(), checkout_locale() (maps the site locale to a Paddle locale when set to automatic), locales( $api ), webhook_url(), form_fields().

admin.js shows only the rows of the selected account type; Settings::tag() adds the classes wpinterface-paddle-billing-field / wpinterface-paddle-classic-field.

Was this page helpful?