Skip to content

Instantly share code, notes, and snippets.

@steve-ross
steve-ross / patch-bigcommerce-checkout.js
Last active April 6, 2022 13:54
Script for patching/changing the BigCommerce Checkout page
var toPatch = [
{ sel: '[name="billingSameAsShipping"]' , click: true },
{ sel: '[name="redeemableCode"]' , prop: 'placeholder', val: 'Enter Promo Code' },
{ sel: '.ReactModalPortal [name="redeemableCode"]' , prop: 'placeholder', val: 'Enter Promo Code' },
];
var matchedSubscriptionItems = [];
function patchIt(patches) {
var afterElementExists = function(selector, cb) {
function findit() {