We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84db731 commit ba2abd9Copy full SHA for ba2abd9
app/code/Magento/Paypal/view/frontend/web/js/in-context/paypal-sdk.js
@@ -25,14 +25,19 @@ define([
25
exports: 'paypal'
26
}
27
},
28
+ attributes: {
29
+ "paypalSdk": dataAttributes
30
+ },
31
32
/**
33
* Add attributes under Paypal SDK Script tag
34
*/
- onNodeCreated: function (node) {
- $.each(dataAttributes, function (index, elem) {
- node.setAttribute(index, elem);
35
- });
+ onNodeCreated: function(node, config, name){
36
+ if(config.attributes && config.attributes[name]){
37
+ $.each(dataAttributes, function (index, elem) {
38
+ node.setAttribute(index, elem);
39
+ });
40
+ }
41
42
});
43
0 commit comments