diff --git a/src/jobs/schedule-abandoned.ts b/src/jobs/schedule-abandoned.ts index 5c17ec9..adb3b2e 100644 --- a/src/jobs/schedule-abandoned.ts +++ b/src/jobs/schedule-abandoned.ts @@ -113,8 +113,11 @@ export default async function handler({ if (cart.abandoned_lastdate && cart.abandoned_last_interval && - (new Date(new Date(cart.abandoned_lastdate).getTime()) < new Date(new Date(cart.abandoned_lastdate).getTime() + int))) { - // logger.info(`This Cart ${cart.id} has been processed recently and will be processes at next interval`) + + (new Date() < new Date(new Date(cart.abandoned_lastdate).getTime() + int))) { + if (process.env.BETA_TESTING_PLUGIN === "TESTING") { + logger.info(`This Cart ${cart.id} has been processed recently and will be processes at next interval`) + } continue }