Coupon

A utility method to retrieve a coupon code from the current page's URL query parameters.

getFromUrl

Gets the coupon passed in the current URL, comes from the "coupon_code" query parameter.

Example

const couponCode = window.Pelcro.coupon.getFromUrl();
console.log(couponCode);