The Magento 2.3.1 upgrade changed our product page's PayPal Express button to an Iframe and we can't seem to revert the changes through the admin interface. We had configured the PayPal Express button to be modified through:
app/design/frontend/theme/default/Magento_Paypal/templates/express/shortcut.phtml
where we modified the button's image
...src="<?= $this->getViewFileUrl('images/paypalicon.png'); ?>"...
This seems to be a direct result of the 2.3.1 version's PayPal changes and the new frontend Smart Buttons that we'd like to disable, but we already have:
- Customize set to No in PayPal Express Settings > Advanced Settings > Frontend Experience Settings > Product Page
- We also have "No logo" set in PayPal Express Settings > Advanced Settings > Frontend Experience Settings
Any suggestions or feedback would be greatly appreciated. Thanks!
Best Answer
In 2.3.2, turning off 'In-Context'
(Admin > Stores > Configuration > Sales > Payment Methods > PayPal Express Checkout > "Enable In-Context Checkout Experience" = No)
resolved this issue for us, but then a PayPal Credit button also appeared (this seems to be a 2.3.2 bug: https://github.com/magento/magento2/issues/22528).We manually forced the PayPal Credit button to hide with a plugin:
Alternatively, you can keep the 'In-context' setting and create a plugin to further customize the PayPal smart button more granularly. PayPal Resource: https://developer.paypal.com/docs/checkout/integration-features/customize-button/.
Plugin:
Now if you have issues with the PayPal login screen flashing and disappearing with a
To check out, please sign in with your email address
message. Then look at this resource: https://github.com/magento/magento2/issues/23761.Override the JavaScript:
Please let me know if I can elaborate on any of the above fixes. Hope this documentation helps someone else out there.