|
|
@@ -789,6 +789,17 @@ async def stripe_webhook(request: Request, background_tasks: BackgroundTasks):
|
|
|
|
|
|
if product_list:
|
|
|
for product_info in product_list:
|
|
|
+ # We need to read the product file and get the variation ID
|
|
|
+ product = read_file(
|
|
|
+ settings.git_repo,
|
|
|
+ f"products/{product_info.filename}",
|
|
|
+ settings.document_match,
|
|
|
+ settings.block_types,
|
|
|
+ )
|
|
|
+
|
|
|
+ # Get the variation ID based on size and style
|
|
|
+ product_variation_id = get_variation_id(product, product_info.size, product_info.style)
|
|
|
+
|
|
|
update_product_inventory(
|
|
|
product_info.filename,
|
|
|
product_info.quantity,
|