Forum Replies Created
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
AiParticipant
Ok. Here is a workaround for anyone looking. Add the code snippet below to the file
pp-handler.js
located in FTP at:wp-content\plugins\stripe-payments\public\assets\js\pp-handler.js
jQuery(document).ready(function(){ var url = window.location.href; var name = 'coupon_code'; var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(url); var thiscode = decodeURI(results[1]) || 0; var couponcode = jQuery(document.getElementById("coupon-code")); var applycouponbtn = jQuery(document.getElementById("apply-coupon-btn")); var customfieldsdiv = jQuery(document.getElementById("custom-fields-cont")); if(customfieldsdiv.length && customfieldsdiv.val().length){ customfieldsdiv.prepend("<div class='pure-u-1'><legend>Customer Info</legend></div>"); } couponcode.val(thiscode); setTimeout(function(){ if(couponcode.length && couponcode.val().length){ applycouponbtn.trigger("click"); } }, 3000); });
Now just add the param to the end of your product link: &coupon_code=MYCOUPONCODEHERE
And of course replace MYCOUPONCODEHERE with a working coupon code set inside of Stripe payment options.
AiParticipantI think the question is if we can add a coupon parameter to the link?
e.g: /asp-payment-box/?product_id=133337&coupon_code=MY COUPONCODEAiParticipantHmmm. The popup is causing me so much issues.
If you right click the link, it will open an embed payment form. Why can’t this be implement again? -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)