Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Use scope to select payment states

Life Lofranco0d811c7fd042
diff --git a/core/app/models/spree/order/payments.rb b/core/app/models/spree/order/payments.rb
index 1ba950ef13..f3c24b59ac 100644
--- a/core/app/models/spree/order/payments.rb
+++ b/core/app/models/spree/order/payments.rb
@@ -32,11 +32,11 @@ module Spree
end
def pending_payments
- payments.select(&:pending?)
+ payments.pending
end
def unprocessed_payments
- payments.select(&:checkout?)
+ payments.checkout
end
private