• Resolved King Ding

    (@dazzerr)


    Hello!

    Fantastic plugin, and very good styling, but I want to change the styling of the Stripe fields slightly. I want to:

    • Add padding to each of the form elements
    • Capitalize the Card Number Label text
    • Change the colour of the Label text of each form element

    Please advise.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @dazzerr

    Which of the credit card forms are you using? The answer on how to customize the form styling is dependent on the form you’re using.

    Kind Regards

    Thread Starter King Ding

    (@dazzerr)

    Just the regular stripe debit/credit card payment ones?

    Here’s a link to which I’m referring to: https://imgur.com/PWx2Z0X

    Also how do I remove the card images where the arrow is pointing?

    Thanks!

    • This reply was modified 1 year, 1 month ago by King Ding.
    Plugin Author Payment Plugins

    (@mrclayton)

    Also how do I remove the card images where the arrow is pointing?

    Stripe doesn’t currently have a way to remove the card icons in the Stripe payment form. If you don’t want card icons I would recommend the Stripe inline form.

    Here is an example of how you can customize the Stripe payment form:

    add_filter('wc_stripe_get_element_options', function($options, $gateway){
    	if($gateway->id === 'stripe_cc'){
    		$options['appearance']['rules'] = [
    			'.Input' => [
    				'padding' => '20px'
    			],
    			'.Label' => [
    				'textTransform' => 'uppercase'
    			]
    		];
    	}
    	return $options;
    }, 10, 2);

    Here is a helpful document on the available CSS rules you can include in the filter.

    Kind Regards

    Thread Starter King Ding

    (@dazzerr)

    Thank you, this is very helpful!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Stripe Form Styling’ is closed to new replies.