Skip to content

Instantly share code, notes, and snippets.

View procarrera's full-sized avatar

Pedro Carrera procarrera

View GitHub Profile
@procarrera
procarrera / update subscriptions.js
Created July 11, 2021 15:49
ReCharge Theme Engine
// this code will update subscriptions from customer dashboard
async function skipCharge(charge_id) {
console.log(charge_id);
const charges = await manageSubscriptions("charges");
const charge = {};
charges.charges.forEach((item) => {
if (item.id === charge_id) {
charge.obj = item;
}