Tags: Delete, Metafields, Schedule
Do you sell tickets to recurring events? Do you use a new product variant for each one? Use this task to regularly scan your catalog for product variants that have a date metafield, and to delete variants when their date has passed.
- View in the task library: tasks.mechanic.dev/delete-variants-having-a-metafield-date-that-has-passed
- Task JSON, for direct import: task.json
- Preview task code: script.liquid
{
"date_metafield_namespace__required": null,
"date_metafield_key__required": null
}
Learn about task options in Mechanic
mechanic/user/trigger
mechanic/scheduler/daily
mechanic/shopify/bulk_operation
Learn about event subscriptions in Mechanic
Do you sell tickets to recurring events? Do you use a new product variant for each one? Use this task to regularly scan your catalog for product variants that have a date metafield, and to delete variants when their date has passed.
Run this task manually to immediately scan your product catalog for outdated variants, and delete them. This task will also run nightly, at midnight in your store's timezone.
Find this task in the library at tasks.mechanic.dev, and use the "Try this task" button. Or, import this task's JSON export – see Importing and exporting tasks to learn how imports work.
Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.
Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!