Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
SD-1544 Check if updated_only_timestamps for update events only (#11544)
Aleksandar Petrushev38610dc434ae
diff --git a/api/app/models/concerns/spree/webhooks/has_webhooks.rb b/api/app/models/concerns/spree/webhooks/has_webhooks.rbindex 8beb55903b..22457c43a3 100644--- a/api/app/models/concerns/spree/webhooks/has_webhooks.rb+++ b/api/app/models/concerns/spree/webhooks/has_webhooks.rb@@ -10,7 +10,7 @@ module Spreedef queue_webhooks_requests!(event_name)return if disable_spree_webhooks? || body.blank?- return if default_event?(event_name) && updating_only_timestamps?+ return if update_event?(event_name) && updating_only_timestamps?Spree::Webhooks::Subscribers::QueueRequests.call(body: body, event_name: event_name)end@@ -46,8 +46,8 @@ module Spree(saved_changes.keys - %w[created_at updated_at deleted_at]).empty?end- def default_event?(event_name)- self.class.default_webhook_events.include?(event_name)+ def update_event?(event_name)+ event_name.end_with?('.update')enddef disable_spree_webhooks?