When rendering buttons in standalone mode (for instance, when some methods are hidden in certain contexts but not in others) the configured button shape is only applied to the main PayPal button and not the other buttons (such as Debit/Credit card or Pay Later). This PR fixes this problem by making sure all buttons are rendered using the same shape.
Steps to test:
For master, follow these steps to confirm the bug (adapted from #806):
Go to: WooCommerce > Settings > Payments > 'PayPal Checkout' > "Button Settings"
Set Button Shape to: Pill
Ensure that Credit or Debit Card is not a hidden funding method: https://d.pr/i/C6LlNY
Ensure that at least one method is hidden to force standalone rendering.
Navigate to checkout to see that the 'PayPal' button is Pill, while 'Credit or Debit Card' is Rectangle: https://d.pr/i/CpSgGF
On this branch (issue-806) all buttons should have the same shape.
Test standalone rendering by ensuring at least one method is hidden.
Test default rendering by ensuring no method is hidden (and PayPal Credit is not disabled).
Changelog entry
Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.
Honor “shape” setting when rendering standalone buttons.
Issue: #806
Description
When rendering buttons in standalone mode (for instance, when some methods are hidden in certain contexts but not in others) the configured button shape is only applied to the main PayPal button and not the other buttons (such as Debit/Credit card or Pay Later). This PR fixes this problem by making sure all buttons are rendered using the same shape.
Steps to test:
master
, follow these steps to confirm the bug (adapted from #806):issue-806
) all buttons should have the same shape.Changelog entry
Honor “shape” setting when rendering standalone buttons.
Closes #806.