effective_orders 5.1.14 → 5.1.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ea7a1a4554f56dd9230c6d1f4c4c00ae6884fb3d61508c1c437464a9106065b
4
- data.tar.gz: 846428fc00eae462dbf46f128b777ec32d22ed8f47415d0b411de9922a39dee6
3
+ metadata.gz: 889ffac4a7ea9e9402e87b841af4d28b6720e23f512dde7ba4f51978b3ebb045
4
+ data.tar.gz: 23a247aeb17a3dc13416ac428e9fdaf00bf4d58384b20f3f45d55e705924028c
5
5
  SHA512:
6
- metadata.gz: f6bcd2880d585a48f68785e62f0b44e52627b68d42e1764ec642bccef8de36810314876bd26b9a24ca0216c2609fb8b8c11649d8c0b63f605f341dcf90c04444
7
- data.tar.gz: cf6eced1338c660b98d2e75eca61b645899fcc6888772cef8c4184d07296ef7e3a684a8ed22c2a19231eb42d737305e0da1fcb74357a13138a8eb52f68d1813a
6
+ metadata.gz: cc23bc2d1e8dd91ea835e18a2e8bb2a0af4d9401b8d4dcdd178a62bf8a36f233a30287c848d97aaceb39875986f00616533d24c610dcdc328548883908e2b68e
7
+ data.tar.gz: 1d9c8baf3fb9f140123d7829225f4180e2d202a911f5fc695f9f39289e89af585ae60b569900b7c551ddc3e2eee40c78c4d8579975b702a41c9987c706ae24a2
@@ -388,15 +388,20 @@ module Effective
388
388
  end
389
389
 
390
390
  def send_order_receipt_to_admin?
391
- EffectiveOrders.mailer[:send_order_receipt_to_admin] && !free?
391
+ return false if free? && !EffectiveOrders.mailer[:send_order_receipts_when_free]
392
+ EffectiveOrders.mailer[:send_order_receipt_to_admin]
392
393
  end
393
394
 
394
395
  def send_order_receipt_to_buyer?
395
- EffectiveOrders.mailer[:send_order_receipt_to_buyer] && !free?
396
+ return false if free? && !EffectiveOrders.mailer[:send_order_receipts_when_free]
397
+ EffectiveOrders.mailer[:send_order_receipt_to_buyer]
396
398
  end
397
399
 
398
400
  def send_payment_request_to_buyer?
399
- EffectiveResources.truthy?(send_payment_request_to_buyer) && !free? && !refund?
401
+ return false if free? && !EffectiveOrders.mailer[:send_order_receipts_when_free]
402
+ return false if refund?
403
+
404
+ EffectiveResources.truthy?(send_payment_request_to_buyer)
400
405
  end
401
406
 
402
407
  def send_mark_as_paid_email_to_buyer?
@@ -95,6 +95,7 @@ EffectiveOrders.setup do |config|
95
95
  send_payment_request_to_buyer: true,
96
96
  send_pending_order_invoice_to_buyer: true,
97
97
  send_order_receipts_when_mark_as_paid: false,
98
+ send_order_receipts_when_free: false,
98
99
 
99
100
  send_subscription_event_to_admin: true,
100
101
  send_subscription_created: true,
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '5.1.14'.freeze
2
+ VERSION = '5.1.15'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.14
4
+ version: 5.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-18 00:00:00.000000000 Z
11
+ date: 2021-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails