woocommerce / woocommerce-gateway-paypal-express-checkout

58 stars 65 forks source link

Button Size setting for Smart buttons on single product pages doesn't work #748

Closed treibalen closed 4 years ago

treibalen commented 4 years ago

Describe the bug

PayPal button size on single product pages is not changed according to Button Size setting.

To reproduce

  1. Enable Checkout on Single Product and change Button Size setting:

https://d.pr/i/ihXFvX Full Size: https://d.pr/i/ihXFvX

  1. PayPal button stays the same size for Small, Medium, Large.

This is Small button on my test site:

https://d.pr/i/px5KYL Full Size: https://d.pr/i/px5KYL

Expected behavior

PayPal button on single product page to be changed according to the Button Size setting.

Environment (please complete the following information):

Setting priority to High since it affects single product page layouts.

james-allan commented 4 years ago

Thanks @treibalen.

I've been able to replicate this. From this line in the code, the new SDK buttons don't support custom button sizes. In the PayPal doc that is linked there, they recommend styling the container with css instead.

So we will need to do that to be backwards compatible.