Skip to content

Commit c6340b5

Browse files
committed
ACP2E-3028: Paylater message not showing in PDP for Canadian paypal merchant account
1 parent 245737c commit c6340b5

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

app/code/Magento/Paypal/view/frontend/web/js/view/paylater.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ define([
5050
let buyerCountry = customerData.get('paypal-buyer-country');
5151

5252
this.buyerCountry = buyerCountry().code;
53-
54-
if (!this.buyerCountry) {
55-
this.attributes['data-pp-placement'] = null;
56-
}
57-
5853
this._super()
5954
.observe(['amount']);
6055

app/code/Magento/Paypal/view/frontend/web/template/paylater.html

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44
* See COPYING.txt for license details.
55
*/
66
-->
7-
<div data-pp-message data-bind="attr: {
8-
'class': getAttribute('class'),
9-
'data-pp-amount': amount,
10-
'data-pp-placement': getAttribute('data-pp-placement'),
11-
'data-pp-style-layout': getAttribute('data-pp-style-layout'),
12-
'data-pp-style-logo-type': getAttribute('data-pp-style-logo-type'),
13-
'data-pp-style-logo-position': getAttribute('data-pp-style-logo-position'),
14-
'data-pp-style-text-color': getAttribute('data-pp-style-text-color'),
15-
'data-pp-style-text-size': getAttribute('data-pp-style-text-size'),
16-
'data-pp-style-color': getAttribute('data-pp-style-color'),
17-
'data-pp-style-ratio': getAttribute('data-pp-style-ratio'),
18-
'data-pp-buyercountry': buyerCountry
19-
}" ></div>
7+
<div data-bind="if: buyerCountry">
8+
<div data-pp-message data-bind="attr: {
9+
'class': getAttribute('class'),
10+
'data-pp-amount': amount,
11+
'data-pp-placement': getAttribute('data-pp-placement'),
12+
'data-pp-style-layout': getAttribute('data-pp-style-layout'),
13+
'data-pp-style-logo-type': getAttribute('data-pp-style-logo-type'),
14+
'data-pp-style-logo-position': getAttribute('data-pp-style-logo-position'),
15+
'data-pp-style-text-color': getAttribute('data-pp-style-text-color'),
16+
'data-pp-style-text-size': getAttribute('data-pp-style-text-size'),
17+
'data-pp-style-color': getAttribute('data-pp-style-color'),
18+
'data-pp-style-ratio': getAttribute('data-pp-style-ratio'),
19+
'data-pp-buyercountry': buyerCountry
20+
}" ></div>
21+
</div>
2022

0 commit comments

Comments
 (0)