Skip to content

Commit b7114ff

Browse files
Apply paylike payment button event only for Paylike payment methond.
Apply paylike payment button event only for Paylike payment methond.
2 parents 5608eb2 + de8f539 commit b7114ff

File tree

2 files changed

+6
-2
lines changed
  • upload_CE-Phoenix-2341-Frozen/includes/javascript
  • upload_ce_phoenix/includes/javascript

2 files changed

+6
-2
lines changed

upload_CE-Phoenix-2341-Frozen/includes/javascript/paylike.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ function pay(args, checkout, form) {
4444

4545
document.addEventListener("DOMContentLoaded", function() {
4646
/* Submit event needed for HTML form validation */
47-
$('form[name="checkout_confirmation"]').on('submit', submitForm);
47+
if($("#payLikeCheckout").length){
48+
$('form[name="checkout_confirmation"]').on('submit', submitForm);
49+
}
4850
})
4951

5052
function submitForm(e) {

upload_ce_phoenix/includes/javascript/paylike.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ function pay(args, checkout, form) {
4242

4343
document.addEventListener("DOMContentLoaded", function() {
4444
/* Submit event needed for HTML form validation */
45-
$('form[name="checkout_confirmation"]').on('submit', submitForm);
45+
if($("#payLikeCheckout").length){
46+
$('form[name="checkout_confirmation"]').on('submit', submitForm);
47+
}
4648
})
4749

4850
function submitForm(e) {

0 commit comments

Comments
 (0)