• Resolved ensalock

    (@ensalock)


    Hey guys,
    I would like to change color + font-weight of the placeholder of the IBAN-field. With that following code, I can change the placeholders of the credit-card-fields.

    function my_theme_modify_stripe_fields_styles( $styles ) {
        return array(
            'base' => array(
                'iconColor'     => '#666EE8',
                'color'         => '#31325F',
                'fontSize'      => '15px',
                '::placeholder' => array(
                    'color' => '#CFD7E0',
                ),
            ),
        );
    }
    
    add_filter( 'wc_stripe_elements_styling', 'my_theme_modify_stripe_fields_styles' );

    But how is it possible to control the placeholder of the IBAN-field?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey @ensalock,

    how is it possible to control the placeholder of the IBAN-field?

    I’m not able to point you in the right direction for code customisations on this level I’m afraid, however, I’m going to leave the topic open for a bit to see if anyone is able to chime in to help you out.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    I hope that helps!

    Kind regards,

    Thread Starter ensalock

    (@ensalock)

    Okay, I got a solution.

    You need a file manager for example this one. Then you go to wordpress/wp-content/plugins/woocommerce-gateway-stripe/includes/abstracts. There you download the abstract-wc-stripe-payment-gateway.php. Open it and

    replace this line
    style' => [ 'base' => [ 'fontSize' => '15px' ] ],

    to this one
    'style' => [ 'base' => [ 'iconColor' => 'blue' , 'color' => 'green' , 'fontSize' => '15px' , 'fontWeight' => '400' , '::placeholder' => array ( 'color' => 'orange' ) ] ],

    Save the changes and upload the file in wordpress/wp-content/plugins/woocommerce-gateway-stripe/includes/abstracts.

    Thread Starter ensalock

    (@ensalock)

    Works with Plugin Version 5.9.0.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change color + font-weight of IBAN-placeholder’ is closed to new replies.