説明

について wpforms_emails_mailer_get_from_name フィルタを使用すると、WPFormsのメールで使用される「差出人」名をカスタマイズできます。例えば、特定のメールテンプレートでサイト名をブランド名や特定のラベルに置き換えることができます。

このフィルタを使用すると、Stripeのデフォルトの外観オブジェクトを上書きできます。オプションはStripeのElements Appearance APIに従うので、あなたのサイトに合わせて色やフォント、レイアウトを調整できます。

パラメータタイプ記述
$appearance配列Stripeペイメントエレメントの外観設定。

ソース

wpforms\src\Integrations\Stripe\Api\PaymentIntents.php

// Change Stripe Payment Element to use floating labels and a custom theme.
function wpf_stripe_payment_element_appearance() {
    return [
        'theme'  => 'stripe',
        'labels' => 'floating',
        'variables' => [
            'colorPrimary'   => '#EFC078',
            'colorText'      => '#ffffff',
            'borderRadius'   => '8px',
        ],
    ];
}
add_filter(
    'wpforms_integrations_stripe_api_payment_intents_set_element_appearance',
    'wpf_stripe_payment_element_appearance'
);

参考記事