Add stylings to the Google Pay button
-
Hello there!
I’m trying to add some stylings to the Google Pay button. I’m trying to add a border to it, change the background, fill on hover etc (if it’s possible, of course, which I’m not sure). I’ve tried to use the?
wc_stripe_upe_params
?hook, but it doesn’t seem to work for either ‘.GooglePayButton’ or ‘.Button’ rules (see below).Here is the code example I implemented to test if I can add the border to the Google Pay button:
add_filter( 'wc_stripe_upe_params', function ( $stripe_params ) {
$stripe_params['appearance'] = (object) [
'rules' => (object) [
// '.Input' => (object) [
// 'fontSize' => '16px',
// 'backgroundColor' => '#212D63',
// 'border' => '20px solid var(--colorPrimary)',
// ],
'.GooglePayButton' => (object) [
'border' => '1px solid #000000',
'backgroundColor' => '#fff'
],
'.Button' => (object) [
'border' => '1px solid #000000',
'backgroundColor' => '#fff'
],
],
'variables' => (object) [
'fontFamily' => '"SF", Sans-serif'
]
];
return $stripe_params;
} );Pls see this thread as a reference https://www.ads-software.com/support/topic/gpay-apple-pay-express-button-appearence-rounded/#post-18130950
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.