Customize Stitch checkout
Choose the lightest approach that fits your goal.
| Goal | Approach |
|---|---|
| Restyle the form | CSS on #wc-stitch-form, .stitch-payment-header, etc. |
| Change labels or copy | Admin settings or stitch_payments_checkout_field_labels / stitch_payments_payment_form_i18n |
| Change logo or branding | Admin settings or stitch_payments_checkout_display_settings |
| Inject HTML (classic) | Action hooks in the payment template |
| Replace classic markup | Theme template override |
| Change Blocks data | stitch_payments_blocks_payment_method_data |
| Style card-number iframe | stitch_payments_iframe_css |
| Customize decline messages | stitch_payments_customer_decline_message |
| Custom checkout page | stitch_payments_is_checkout_context |
Classic template override
Copy the plugin template to your theme:
wp-content/themes/your-theme/woocommerce/stitch/payment-form.php
Template variables
| Variable | Description |
|---|---|
$gateway | Gateway instance |
$enable_profiles | Saved payment methods enabled |
$checkout_display | Branding options |
$field_labels | Field label strings |
$i18n | Payment form strings |
$saved_methods | Saved cards keyed by account ID |
$default_acct_id | Pre-selected saved card |
Filter template args with stitch_payments_payment_form_template_args.
Example: filter template args
add_filter( 'stitch_payments_payment_form_template_args', function ( $args, $gateway ) {
$args['i18n']['save_card'] = 'Store this card securely';
return $args;
}, 10, 2 );
Blocks checkout
Blocks checkout does not use the PHP template. Use:
stitch_payments_blocks_payment_method_datafor script datastitch_payments_payment_form_i18nfor shared strings
Companion plugin bootstrap
<?php
/**
* Plugin Name: My Stitch Checkout Tweaks
*/
add_action( 'stitch_payments_loaded', function () {
add_filter( 'stitch_payments_payment_form_i18n', function ( $strings, $gateway ) {
$strings['save_card'] = 'Securely store this card';
return $strings;
}, 10, 2 );
add_action( 'stitch_payments_before_payment_form', function ( $gateway, $saved_methods ) {
echo '<p class="my-stitch-notice">We accept Visa and Mastercard.</p>';
}, 10, 2 );
} );
Payment header HTML
If you filter stitch_payments_payment_header_html, return markup you trust. Output is sanitized with Card_Icons::kses_payment_header_html() so inline SVG card icons are preserved (unlike wp_kses_post()).
See the full Hooks reference.